Skip to content

Commit

Permalink
CI: Build ruby matrix dynamically
Browse files Browse the repository at this point in the history
This is based on the new composable action https://github.com/voxpupuli/ruby-version
  • Loading branch information
bastelfreak committed Jan 24, 2025
1 parent 0d7784a commit 487daa8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,30 @@ jobs:
bundler-cache: true
- name: Run RuboCop
run: bundle exec rake rubocop
setup_matrix:
name: 'Determine Ruby versions'
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- id: ruby
uses: voxpupuli/ruby-version@v0
test:
name: "Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
needs: setup_matrix
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7"
- ruby: "3.0"
- ruby: "3.1"
- ruby: "3.2"
- ruby: "3.3"
ruby: ${{ fromJSON(needs.setup_matrix.outputs.ruby) }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
run: rake
- name: Build the gem
run: gem build --strict --verbose *.gemspec

Expand Down

0 comments on commit 487daa8

Please sign in to comment.