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 #22

Draft
wants to merge 2 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
43 changes: 42 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
version: 2.1

orbs:
redmine-plugin: agileware-jp/redmine-plugin@3.6.1
redmine-plugin: agileware-jp/redmine-plugin@3.7.0

jobs:
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
- run: sudo apt-get install fonts-migmix
- redmine-plugin/rspec:
test_migration_rollback: false
- store_artifacts:
path: redmine/tmp/capybara
destination: screenshots
rspec:
parameters:
redmine_version:
Expand Down Expand Up @@ -47,6 +79,15 @@ workflows:
version: 2
test:
jobs:
- rspec-git-url:
<<: *default_context
<<: *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
2 changes: 1 addition & 1 deletion app/models/trashed_custom_value.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class TrashedCustomValue < ActiveRecord::Base
class TrashedCustomValue < defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base
belongs_to :trashed_issue

acts_as_attachable view_permission: :view_files
Expand Down
2 changes: 1 addition & 1 deletion app/models/trashed_issue.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class TrashedIssue < ActiveRecord::Base
class TrashedIssue < defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base
belongs_to :project
has_many :trashed_custom_values, dependent: :destroy
belongs_to :deleted_by, class_name: 'User'
Expand Down