Skip to content

Commit

Permalink
ci: Test with Ruby 2.6, 2.7, 3.0, 3.1 and head
Browse files Browse the repository at this point in the history
We need to use ruby/setup-ruby instead of
actions/setup-ruby. actions/setup-ruby is deprecated. It doesn't
support newer Rubies.

See:
actions/setup-ruby@e932e7a

We can use bundler-cache to run Bundler and cache the result with
ruby/setup-ruby: https://github.com/ruby/setup-ruby#bundler
  • Loading branch information
kou committed Jan 31, 2022
1 parent 63a963e commit e0dc200
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ jobs:
test:
name: rake test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- head
- "3.1"
- "3.0"
- "2.7"
- "2.6"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- run: |
gem install bundler --no-document
bundle install
bundle exec rake test

0 comments on commit e0dc200

Please sign in to comment.