File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,14 +12,17 @@ jobs:
1212 name : Reviewdog
1313 runs-on : ubuntu-latest
1414
15+ env :
16+ RAILS_VERSION : 7.0.0
17+
1518 steps :
1619 - name : Checkout repository
1720 uses : actions/checkout@v4
1821
1922 - name : Set up Ruby
2023 uses : ruby/setup-ruby@v1
2124 with :
22- ruby-version : ' 2.7 '
25+ ruby-version : ' 3.0 '
2326 bundler-cache : true
2427
2528 - name : Set up Reviewdog
Original file line number Diff line number Diff line change 1+ ---
2+ name : Specs Rails 6.1 with ActiveAdmin 2.9
3+
4+ on :
5+ pull_request :
6+ branches : [main]
7+ push :
8+ branches : [main]
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ ruby : ['3.0']
17+
18+ env :
19+ RAILS_VERSION : 6.0
20+ ACTIVEADMIN_VERSION : 2.9.0
21+
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+
26+ - name : Set up Ruby
27+ uses : ruby/setup-ruby@v1
28+ with :
29+ ruby-version : ${{ matrix.ruby }}
30+ bundler-cache : true
31+
32+ - name : Database setup
33+ run : bin/rails db:reset db:test:prepare
34+
35+ - name : Run tests
36+ run : bundle exec rspec --profile
37+
38+ - name : On failure, archive screenshots as artifacts
39+ uses : actions/upload-artifact@v4
40+ if : failure()
41+ with :
42+ name : test-failed-screenshots
43+ path : spec/dummy/tmp/screenshots
Original file line number Diff line number Diff line change 1414 strategy :
1515 matrix :
1616 ruby : ['3.0', '3.2']
17- gemfile : ['rails70_activeadmin']
1817
1918 env :
20- BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
19+ RAILS_VERSION : 7.0.0
2120
2221 steps :
2322 - name : Checkout repository
Original file line number Diff line number Diff line change 1414 strategy :
1515 matrix :
1616 ruby : ['3.2', '3.4']
17- gemfile : ['rails71_activeadmin']
1817
1918 env :
20- BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
19+ RAILS_VERSION : 7.1.0
2120
2221 steps :
2322 - name : Checkout repository
Original file line number Diff line number Diff line change 1414 strategy :
1515 matrix :
1616 ruby : ['3.2', '3.4']
17- gemfile : ['rails72_activeadmin']
1817
1918 env :
20- BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
19+ RAILS_VERSION : 7.2.0
2120
2221 steps :
2322 - name : Checkout repository
Original file line number Diff line number Diff line change 1414 strategy :
1515 matrix :
1616 ruby : ['3.2', '3.4']
17- gemfile : ['rails80_activeadmin']
1817
1918 env :
20- BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
19+ RAILS_VERSION : 8.0.0
2120
2221 steps :
2322 - name : Checkout repository
Original file line number Diff line number Diff line change 99 - rubocop-rspec
1010
1111AllCops :
12+ TargetRubyVersion : 3.0
1213 Exclude :
1314 - bin/*
1415 - db/schema.rb
Original file line number Diff line number Diff line change 33source 'https://rubygems.org'
44
55if ENV [ 'DEVEL' ] == '1'
6- rails_ver = ENV . fetch ( 'RAILS_VERSION' , '' )
7- activeadmin_ver = ENV . fetch ( 'ACTIVEADMIN_VERSION' , '' )
8-
9- if rails_ver . empty?
10- gem 'rails'
11- else
12- gem 'rails' , "~> #{ rails_ver } "
13- end
14-
15- if activeadmin_ver . empty?
16- gem 'activeadmin'
17- else
18- gem 'activeadmin' , "~> #{ activeadmin_ver } "
19- end
20-
216 gem 'activeadmin_dynamic_fields' , path : './'
22- gem 'appraisal' , '~> 2.4'
23-
24- if rails_ver . start_with? ( '7.0' )
25- gem 'concurrent-ruby' , '1.3.4'
26- gem 'sqlite3' , '~> 1.4'
27- else
28- gem 'sqlite3'
29- end
307else
318 gemspec
329end
3310
11+ rails_ver = ENV . fetch ( 'RAILS_VERSION' , '' )
12+ activeadmin_ver = ENV . fetch ( 'ACTIVEADMIN_VERSION' , '' )
13+
14+ rails = rails_ver . empty? ? [ 'rails' ] : [ 'rails' , "~> #{ rails_ver } " ]
15+ gem *rails
16+
17+ activeadmin = activeadmin_ver . empty? ? [ 'activeadmin' ] : [ 'activeadmin' , "~> #{ activeadmin_ver } " ]
18+ gem *activeadmin
19+
20+ sqlite3 = Gem ::Version . new ( rails_ver ) > Gem ::Version . new ( '7.1' ) ? [ 'sqlite3' ] : [ 'sqlite3' , '~> 1.4' ]
21+ gem *sqlite3
22+
23+ # NOTE: to avoid error: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
24+ gem 'concurrent-ruby' , '1.3.4'
25+
3426gem 'bigdecimal'
3527gem 'mutex_m'
3628gem 'puma'
You can’t perform that action at this time.
0 commit comments