Skip to content

Commit 708ce44

Browse files
Run Ruby 2.2 tests on old Ubuntu
1 parent 7ed7c8f commit 708ce44

File tree

1 file changed

+52
-29
lines changed

1 file changed

+52
-29
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
ruby:
19-
- 2.2
2019
- 2.3
2120
- 2.4
2221
- 2.5
@@ -25,7 +24,6 @@ jobs:
2524
- 3.0
2625
- 3.1
2726
- 3.2
28-
# - truffleruby-head
2927
gemfile:
3028
# These are located in the gemfiles/ folder
3129
- rails42
@@ -57,15 +55,6 @@ jobs:
5755
exclude:
5856
# Following https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
5957
# to decide what to include.
60-
- { ruby: 2.2, gemfile: rails60 }
61-
- { ruby: 2.2, gemfile: rails60_boc }
62-
- { ruby: 2.2, gemfile: rails60_haml }
63-
- { ruby: 2.2, gemfile: rails61 }
64-
- { ruby: 2.2, gemfile: rails61_boc }
65-
- { ruby: 2.2, gemfile: rails61_haml }
66-
- { ruby: 2.2, gemfile: rails70 }
67-
- { ruby: 2.2, gemfile: rails70_boc }
68-
- { ruby: 2.2, gemfile: rails70_haml }
6958
- { ruby: 2.3, gemfile: rails42 }
7059
- { ruby: 2.3, gemfile: rails42_boc }
7160
- { ruby: 2.3, gemfile: rails42_haml }
@@ -177,14 +166,9 @@ jobs:
177166
- { ruby: 3.2, gemfile: rails60 }
178167
- { ruby: 3.2, gemfile: rails60_boc }
179168
- { ruby: 3.2, gemfile: rails60_haml }
180-
# - { ruby: truffleruby-head, gemfile: rails42_boc }
181-
# - { ruby: truffleruby-head, gemfile: rails50_boc }
182-
# - { ruby: truffleruby-head, gemfile: rails51_boc }
183-
# - { ruby: truffleruby-head, gemfile: rails52_boc }
184-
# - { ruby: truffleruby-head, gemfile: rails60_boc }
185-
# - { ruby: truffleruby-head, gemfile: rails61_boc }
186-
# - { ruby: truffleruby-head, gemfile: rails70_boc }
187-
# - { ruby: truffleruby-head, gemfile: rack_boc }
169+
170+
env:
171+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
188172

189173
steps:
190174

@@ -194,23 +178,62 @@ jobs:
194178
uses: ruby/setup-ruby@v1
195179
with:
196180
ruby-version: ${{ matrix.ruby }}
181+
bundler-cache: true
197182

198-
- uses: actions/cache@v2
183+
- name: Bundle install
184+
run: |
185+
bundle config path vendor/bundle
186+
bundle install --jobs 4 --retry 3
187+
188+
- name: RSpec
189+
run: bundle exec rspec -f doc --color
190+
191+
test_older:
192+
# Ruby 2.2 has a known issue on Ubuntu 22, so we must test it on Ubuntu 20
193+
# https://github.com/ruby/setup-ruby/issues/496
194+
runs-on: ubuntu-20.04
195+
strategy:
196+
fail-fast: false
197+
matrix:
198+
ruby:
199+
- 2.2
200+
gemfile:
201+
# These are located in the gemfiles/ folder
202+
- rails42
203+
- rails50
204+
- rails51
205+
- rails52
206+
- rails42_haml
207+
- rails50_haml
208+
- rails51_haml
209+
- rails52_haml
210+
- rails42_boc
211+
- rails50_boc
212+
- rails51_boc
213+
- rails52_boc
214+
- rack
215+
- rack_boc
216+
# - pry09
217+
# - pry10
218+
# - pry11
219+
220+
env:
221+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
222+
223+
steps:
224+
225+
- uses: actions/checkout@v2
226+
227+
- name: Set up Ruby
228+
uses: ruby/setup-ruby@v1
199229
with:
200-
path: gemfiles/vendor/bundle
201-
key: v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
202-
restore-keys: |
203-
v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
204-
v3-${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
230+
ruby-version: ${{ matrix.ruby }}
231+
bundler-cache: true
205232

206233
- name: Bundle install
207234
run: |
208235
bundle config path vendor/bundle
209236
bundle install --jobs 4 --retry 3
210-
env:
211-
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
212237
213238
- name: RSpec
214239
run: bundle exec rspec -f doc --color
215-
env:
216-
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

0 commit comments

Comments
 (0)