Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add circleci job #58

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
redmine-plugin: agileware-jp/redmine-plugin@3.5.0
redmine-plugin: agileware-jp/redmine-plugin@3.7.0
rubocop:
executors:
rubocop-executor:
Expand Down Expand Up @@ -75,6 +75,36 @@ jobs:
gem-name: rubocop-performance
- rubocop/run-cops:
rubocop_option: --fail-level E --display-only-fail-level-offenses -f s -c << parameters.rubocop_config_path >> << parameters.rubocop_files >>
rspec-git-url:
parameters:
redmine_git_url:
type: string
redmine_version:
type: string
ruby_version:
type: string
db:
type: enum
enum: ['mysql', 'pg']
db_version:
type: string
executor:
name: redmine-plugin/ruby-<< parameters.db >>
ruby_version: << parameters.ruby_version >>
db_version: << parameters.db_version >>
steps:
- checkout
- redmine-plugin/download-redmine-git-url:
git_url: << parameters.redmine_git_url >>
version: << parameters.redmine_version >>
- redmine-plugin/install-self
- redmine-plugin/generate-database_yml
- redmine-plugin/bundle-install
- redmine-plugin/migrate-without-plugins
- redmine-plugin/rspec
- store_artifacts:
path: redmine/tmp/capybara
destination: screenshots
rspec:
parameters:
redmine_version:
Expand Down Expand Up @@ -120,6 +150,15 @@ workflows:
<<: *default_context
<<: *ignore_trial
rubocop_config_path: ~/project/.rubocop.yml
- rspec-git-url:
!!merge <<: *default_context
!!merge <<: *ignore_trial
name: RSpec on Redmine git with PostgreSQL
redmine_git_url: $REDMINE_GIT_URL
redmine_version: $REDMINE_GIT_REVISION
ruby_version: $REDMINE_GIT_RUBY_VERSION
db: pg
db_version: $POSTGRES_VERSION
- rspec:
<<: *default_context
<<: *ignore_trial
Expand Down
3 changes: 3 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ en:
setting_webhook_use_hostname: Use Redmine hostname in webhook requests
text_github_repository_note: "Example: https://github.com/[owner]/[repository name].git"
activerecord:
attributes:
pull_request:
url: URL
errors:
models:
repository/github:
Expand Down
3 changes: 3 additions & 0 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ja:
setting_webhook_use_hostname: Webhookリクエストでhostnameを使います
text_github_repository_note: "例: https://github.com/[owner]/[repository name].git"
activerecord:
attributes:
pull_request:
url: URL
errors:
models:
repository/github:
Expand Down
2 changes: 1 addition & 1 deletion spec/features/issue_index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require File.expand_path('../rails_helper', __dir__)

RSpec.describe 'Issue Index Page' do
RSpec.feature 'Issue Index Page', type: :feature do
let!(:issue_with_pr) do
create(
:issue,
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/hooks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require File.expand_path('../rails_helper', __dir__)

RSpec.describe 'POST /redmine_github/webhook/' do
RSpec.describe 'POST /redmine_github/webhook/', type: :request do
describe 'handle' do
shared_examples 'call handler with correct arguments and return http ok' do
it {
Expand Down