File tree Expand file tree Collapse file tree 3 files changed +56
-35
lines changed Expand file tree Collapse file tree 3 files changed +56
-35
lines changed Original file line number Diff line number Diff line change 2
2
name : CI
3
3
4
4
on :
5
- - push
6
- - pull_request
5
+ push :
6
+ branches :
7
+ - master
8
+ pull_request :
7
9
8
10
permissions :
9
11
contents : read
10
12
11
13
jobs :
12
14
rspec :
13
- runs-on : ubuntu-20.04
15
+ name : >-
16
+ rspec (${{ matrix.ruby }})
17
+
18
+ runs-on : ubuntu-latest
19
+
14
20
strategy :
15
21
fail-fast : false
16
22
matrix :
17
23
ruby :
18
- - ' 3.3'
19
- - ' 3.2'
20
- - ' 3.1'
21
- - ' 3.0'
22
- - ' 2.7'
23
- - ' 2.6'
24
- - ' 2.5'
25
- - ' 2.4'
24
+ - 3.3
25
+ - 3.2
26
+ - 3.1
27
+ rails :
28
+ - 6.1 # TODO: move to 7.2
29
+ include :
30
+ # Edge
31
+ - { ruby: 'head', rails: 'edge', allow-fail: true }
32
+ # Outdated
33
+ - { ruby: '3.0', rails: '6.1' } # TODO: move to 7.1
34
+ - { ruby: '2.7', rails: '6' } # RSpec AR Expectations support Rails 7.1 since Ruby 3.0
35
+ - { ruby: '2.6', rails: '6' }
36
+ - { ruby: '2.5', rails: '6' }
37
+ - { ruby: '2.4', rails: '5' }
38
+
39
+ env :
40
+ RAILS_VERSION : " ${{ matrix.rails }}"
26
41
27
42
services :
28
43
mongodb :
@@ -31,13 +46,13 @@ jobs:
31
46
- 27017:27017
32
47
33
48
steps :
34
- - name : Checkout
35
- uses : actions/checkout@v4
49
+ - uses : actions/checkout@v4
36
50
37
51
- name : Setup Ruby
38
52
uses : ruby/setup-ruby@v1
39
53
with :
40
54
ruby-version : ${{ matrix.ruby }}
55
+ rubygems : latest
41
56
bundler-cache : true
42
57
43
58
- name : RSpec & publish code coverage
46
61
CC_TEST_REPORTER_ID : b7ba588af2a540fa96c267b3655a2afe31ea29976dc25905a668dd28d5e88915
47
62
with :
48
63
coverageCommand : bin/rake
64
+ continue-on-error : ${{ matrix.allow-fail }}
65
+ id : test
66
+
67
+ - name : >-
68
+ Test ${{ steps.test.outcome }}
69
+ run: |
70
+ echo Ruby ${{ matrix.ruby }}
71
+ echo Rails ${{ matrix.rails }}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ source "https://rubygems.org"
2
2
3
3
gemspec
4
4
5
+ gem 'puma'
6
+
5
7
platforms :ruby do
6
8
if RUBY_VERSION >= "2.5.0"
7
9
gem 'sqlite3' , '~> 1.4'
@@ -15,32 +17,28 @@ platforms :jruby do
15
17
gem "activerecord-jdbcsqlite3-adapter"
16
18
end
17
19
18
- if RUBY_VERSION >= "2.6.0"
19
- gem "turbo-rails"
20
- gem "redis" , "~> 4.0"
21
- end
20
+ gem 'mongoid'
22
21
23
- if RUBY_VERSION >= "2.5.0"
24
- gem "rails" , "~> 6.0"
25
- gem 'webrick'
22
+ case rails_version = ENV [ 'RAILS_VERSION' ]
23
+ when nil
24
+ gem 'rails'
25
+ when 'edge'
26
+ gem 'rails' , github : 'rails/rails'
26
27
else
27
- gem " rails" , "~> 5 .0"
28
+ gem ' rails' , "~> #{ rails_version } .0"
28
29
end
29
30
30
- if RUBY_VERSION >= "2.7.0"
31
- gem "mongoid" , github : "mongodb/mongoid"
32
- elsif RUBY_VERSION >= "2.6.0"
33
- gem "mongoid" , "~> 8.1"
34
- else
35
- gem "mongoid" , "~> 7.2"
36
- end
37
-
38
- if RUBY_VERSION >= "3.1.0"
39
- gem "net-imap"
40
- gem "net-pop"
41
- gem "net-smtp"
31
+ case RUBY_VERSION
32
+ when '2.6' ...'3.0'
33
+ gem "turbo-rails" , "<= 2.0.7"
34
+ gem "redis" , "~> 4.0"
35
+ when '3.0' ...'4'
36
+ gem 'turbo-rails'
37
+ gem 'redis' , '~> 4.0'
42
38
end
43
39
44
40
if RUBY_VERSION < "2.5.0"
41
+ gem 'rspec-activerecord-expectations' , '~> 1.2.0'
42
+ gem 'simplecov' , '0.17.1'
45
43
gem "loofah" , "< 2.21.0" # Workaround for `uninitialized constant Nokogiri::HTML4`
46
44
end
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ Gem::Specification.new do |s|
26
26
s . add_development_dependency 'ammeter'
27
27
s . add_development_dependency 'rake'
28
28
s . add_development_dependency 'rspec-rails'
29
- s . add_development_dependency 'rspec-activerecord-expectations' , '~> 1.2.0'
29
+ s . add_development_dependency 'rspec-activerecord-expectations'
30
30
s . add_development_dependency 'minitest-rails'
31
31
s . add_development_dependency 'capybara'
32
32
s . add_development_dependency 'active_model_serializers' , '>= 0.10'
33
33
s . add_development_dependency 'rubocop'
34
- s . add_development_dependency 'simplecov' , '0.17.1'
34
+ s . add_development_dependency 'simplecov'
35
35
end
You can’t perform that action at this time.
0 commit comments