Skip to content

Commit

Permalink
Run Ruby 2.2 tests on old Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDaugherty committed Jun 14, 2023
1 parent 7ed7c8f commit 708ce44
Showing 1 changed file with 52 additions and 29 deletions.
81 changes: 52 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.2
- 2.3
- 2.4
- 2.5
Expand All @@ -25,7 +24,6 @@ jobs:
- 3.0
- 3.1
- 3.2
# - truffleruby-head
gemfile:
# These are located in the gemfiles/ folder
- rails42
Expand Down Expand Up @@ -57,15 +55,6 @@ jobs:
exclude:
# Following https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
# to decide what to include.
- { ruby: 2.2, gemfile: rails60 }
- { ruby: 2.2, gemfile: rails60_boc }
- { ruby: 2.2, gemfile: rails60_haml }
- { ruby: 2.2, gemfile: rails61 }
- { ruby: 2.2, gemfile: rails61_boc }
- { ruby: 2.2, gemfile: rails61_haml }
- { ruby: 2.2, gemfile: rails70 }
- { ruby: 2.2, gemfile: rails70_boc }
- { ruby: 2.2, gemfile: rails70_haml }
- { ruby: 2.3, gemfile: rails42 }
- { ruby: 2.3, gemfile: rails42_boc }
- { ruby: 2.3, gemfile: rails42_haml }
Expand Down Expand Up @@ -177,14 +166,9 @@ jobs:
- { ruby: 3.2, gemfile: rails60 }
- { ruby: 3.2, gemfile: rails60_boc }
- { ruby: 3.2, gemfile: rails60_haml }
# - { ruby: truffleruby-head, gemfile: rails42_boc }
# - { ruby: truffleruby-head, gemfile: rails50_boc }
# - { ruby: truffleruby-head, gemfile: rails51_boc }
# - { ruby: truffleruby-head, gemfile: rails52_boc }
# - { ruby: truffleruby-head, gemfile: rails60_boc }
# - { ruby: truffleruby-head, gemfile: rails61_boc }
# - { ruby: truffleruby-head, gemfile: rails70_boc }
# - { ruby: truffleruby-head, gemfile: rack_boc }

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

steps:

Expand All @@ -194,23 +178,62 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- uses: actions/cache@v2
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: RSpec
run: bundle exec rspec -f doc --color

test_older:
# Ruby 2.2 has a known issue on Ubuntu 22, so we must test it on Ubuntu 20
# https://github.com/ruby/setup-ruby/issues/496
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
- 2.2
gemfile:
# These are located in the gemfiles/ folder
- rails42
- rails50
- rails51
- rails52
- rails42_haml
- rails50_haml
- rails51_haml
- rails52_haml
- rails42_boc
- rails50_boc
- rails51_boc
- rails52_boc
- rack
- rack_boc
# - pry09
# - pry10
# - pry11

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

steps:

- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
path: gemfiles/vendor/bundle
key: v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
restore-keys: |
v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
v3-${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
- name: RSpec
run: bundle exec rspec -f doc --color
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

0 comments on commit 708ce44

Please sign in to comment.