Skip to content

Commit

Permalink
Try testing against every Ruby version since 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
evanleck committed Sep 22, 2023
1 parent c80e61a commit 8af4239
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: Test
on: [push, pull_request]

jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
min_version: 2.5

test:
strategy:
fail-fast: false
matrix:
ruby-version: [3.2, 3.1, '3.0', 2.7, 2.6, 2.5]
needs: ruby-versions

# From https://docs.github.com/en/actions/guides/creating-redis-service-containers
services:
Expand All @@ -21,15 +23,26 @@ jobs:
ports:
- 6379:6379

runs-on: ubuntu-latest
name: Test (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ubuntu-latest, macos-latest, windows-latest]
# exclude:
# - { ruby: jruby }
# - { ruby: jruby-head }
# - { ruby: truffleruby }
# - { ruby: truffleruby-head }

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Ruby ${{ matrix.ruby-version }}
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby-version }}
ruby-version: ${{ matrix.ruby }}

- name: Run tests & lint
run: bundle exec rake

0 comments on commit 8af4239

Please sign in to comment.