Skip to content

Commit d86f2e7

Browse files
authored
Refactor/simplify test matrix (#588)
* Add ruby 2.6 to include key instead of excluding all bad options * Move ruby 2.7 to include matrix * Unsupported / latest rubies now in include matrix * Final re-ordering of test matrix to get all items working as previously expected (3.0 has an exclusion in owing to capybara) * Remove ruby 2.7 rails 5.2 per the rules Remove duplicate ruby 3.0 testing Update documentation to read better * Remove ruby 3.3 with rails 6.1 from the runtime matrix * Update unsupported rubies with exactly what release of rails is permitted * Update EOL testing notes * Duplicate the notes according to the section they cover so we know why we are excluding combinations in the test matrix * Update apprraisals gemfiles
1 parent 522d7cf commit d86f2e7

File tree

6 files changed

+41
-43
lines changed

6 files changed

+41
-43
lines changed

.github/workflows/test.yml

+27-31
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,41 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
19+
# Latest ruby will only be tested on
20+
# - all rails versions in current major & latest minor rails version of the previous major
21+
#
22+
# Any unsupported ruby will only be tested on
23+
# - rails versions if their patch release is within 6 months of the Ruby EOL date
24+
# - No version of the current rails major
25+
#
26+
# 2.6 -> EOL Mar '22 -> Only test Rails versions initially released before Sep '22
27+
# 2.7 -> EOL Mar '23 -> Only test Rails versions initially released before Sep '23
28+
# 3.0 -> EOL Mar '24 -> Only test Rails versions initially released before Sep '24
29+
include:
30+
- { ruby: '2.6', gemfile: 'rails_5_2' }
31+
- { ruby: '2.7', gemfile: 'rails_6_0' }
32+
- { ruby: '2.7', gemfile: 'rails_6_1' }
33+
# Capybara has an incompatibility here with rails 6. It's easier to just exclude this one run from the matrix until it's out of support
34+
# As such ruby 3.0 is tested on rails 7.0 ONLY as an EXCEPTION to the above rules (Because we need at least one combination of ruby/rails)
35+
# Ruby 3.0+ also won't work with Rails 5.2: https://github.com/rails/rails/issues/40938
36+
- { ruby: '3.0', gemfile: 'rails_7_0' }
37+
# Ruby 3.1+ has issues with Rails 6.1 https://github.com/rails/rails/issues/46883#issuecomment-1371325906
38+
# It (Rails 6.1.x), has been marked as a won't fix and as such it's likely this will need to just be excluded until out of support window
39+
- { ruby: '3.3', gemfile: 'rails_7_0' }
40+
- { ruby: '3.3', gemfile: 'rails_7_1' }
41+
- { ruby: '3.3', gemfile: 'rails_7_2' }
42+
# Supported rubies will test all permissible supported rails versions
43+
ruby: ['3.1', '3.2']
2044
gemfile: ['rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0', 'rails_7_1', 'rails_7_2']
2145
exclude:
22-
# Latest ruby will test
23-
# - all rails versions in current major
24-
# - latest rails version in the previous major
25-
# Supported rubies will test
26-
# - all permissible supported rails versions
27-
# Unsupported rubies will test
28-
# - rails versions in each branch if they are released within 6 months of EOL
29-
# - nothing in the current rails major
30-
31-
# 2.6 -> Unsupported from March '22 -> Only test up to Sep '22
32-
# 2.7 -> Unsupported from March '23 -> Only test up to Sep '23
33-
# 3.0/3.1/3.2 -> Supported
34-
- { ruby: '2.6', gemfile: 'rails_6_0' }
35-
- { ruby: '2.6', gemfile: 'rails_6_1' }
36-
- { ruby: '2.6', gemfile: 'rails_7_0' }
37-
- { ruby: '2.6', gemfile: 'rails_7_1' }
38-
- { ruby: '2.6', gemfile: 'rails_7_2' }
39-
- { ruby: '2.7', gemfile: 'rails_7_0' }
40-
- { ruby: '2.7', gemfile: 'rails_7_1' }
41-
- { ruby: '2.7', gemfile: 'rails_7_2' }
42-
- { ruby: '3.0', gemfile: 'rails_7_2' }
43-
# Ruby 3+ won't work with Rails 5.2: https://github.com/rails/rails/issues/40938
44-
- { ruby: '3.0', gemfile: 'rails_5_2' }
45-
# Capybara has an incompatibility here with rails 6. It's easier to just exclude this one run from the matrix until it's out of support
46-
- { ruby: '3.0', gemfile: 'rails_6_0' }
47-
- { ruby: '3.0', gemfile: 'rails_6_1' }
46+
# Ruby 3.0+ doesn't work with Rails 5.2: https://github.com/rails/rails/issues/40938
47+
# Ruby 3.1+ has a conflicting Psych version with Rails 6.x: https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
4848
- { ruby: '3.1', gemfile: 'rails_5_2' }
49-
# Ruby 3.1+ has a conflicting Psych version with Rails 6.x: https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
5049
- { ruby: '3.1', gemfile: 'rails_6_0' }
5150
- { ruby: '3.1', gemfile: 'rails_6_1' }
5251
- { ruby: '3.2', gemfile: 'rails_5_2' }
5352
- { ruby: '3.2', gemfile: 'rails_6_0' }
5453
- { ruby: '3.2', gemfile: 'rails_6_1' }
55-
- { ruby: '3.3', gemfile: 'rails_5_2' }
56-
- { ruby: '3.3', gemfile: 'rails_6_0' }
57-
- { ruby: '3.3', gemfile: 'rails_6_1' }
5854
env:
5955
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
6056
steps:

Appraisals

+7-6
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,25 @@ appraise 'rails_6_1' do
2929
gem 'factory_bot', '< 6.4'
3030
gem 'psych', '< 4'
3131
gem 'railties', '~> 6.1.7'
32-
gem 'sqlite3', '~> 1.4'
32+
gem 'sqlite3', '< 2'
3333
end
3434

3535
appraise 'rails_7_0' do
3636
gem 'activerecord'
3737
gem 'cucumber', '< 10'
38+
gem 'factory_bot', '< 6.6'
3839
gem 'railties', '~> 7.0.8'
39-
gem 'sqlite3', '~> 1.7'
40+
gem 'sqlite3', '< 2'
4041
end
4142

4243
appraise 'rails_7_1' do
4344
gem 'activerecord'
44-
gem 'railties', '~> 7.1.3'
45-
gem 'sqlite3', '~> 1.7'
45+
gem 'railties', '~> 7.1.5'
46+
gem 'sqlite3', '~> 2.0'
4647
end
4748

4849
appraise 'rails_7_2' do
4950
gem 'activerecord'
50-
gem 'railties', '~> 7.2.1'
51-
gem 'sqlite3', '~> 1.7'
51+
gem 'railties', '~> 7.2.2'
52+
gem 'sqlite3', '~> 2.2'
5253
end

gemfiles/rails_6_1.gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ gem "capybara", "< 3.38"
77
gem "factory_bot", "< 6.4"
88
gem "psych", "< 4"
99
gem "railties", "~> 6.1.7"
10-
gem "sqlite3", "~> 1.4"
10+
gem "sqlite3", "< 2"
1111

1212
gemspec path: "../"

gemfiles/rails_7_0.gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ source "https://rubygems.org"
44

55
gem "activerecord"
66
gem "cucumber", "< 10"
7+
gem "factory_bot", "< 6.6"
78
gem "railties", "~> 7.0.8"
8-
gem "sqlite3", "~> 1.7"
9+
gem "sqlite3", "< 2"
910

1011
gemspec path: "../"

gemfiles/rails_7_1.gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
gem "activerecord"
6-
gem "railties", "~> 7.1.3"
7-
gem "sqlite3", "~> 1.7"
6+
gem "railties", "~> 7.1.5"
7+
gem "sqlite3", "~> 2.0"
88

99
gemspec path: "../"

gemfiles/rails_7_2.gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
gem "activerecord"
6-
gem "railties", "~> 7.2.1"
7-
gem "sqlite3", "~> 1.7"
6+
gem "railties", "~> 7.2.2"
7+
gem "sqlite3", "~> 2.2"
88

99
gemspec path: "../"

0 commit comments

Comments
 (0)