Skip to content

Commit

Permalink
run matrix generation after rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jan 24, 2025
1 parent df36c76 commit 33f00f2
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,30 @@ env:
BUNDLE_WITHOUT: release

jobs:
rubocop:
rubocop_and_matrix:
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.3
- name: Install Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
ruby-version: '3.4'
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
uses: voxpupuli/ruby-version@v1

test:
name: "Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
needs: setup_matrix
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.setup_matrix.outputs.ruby) }}
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
steps:
- uses: actions/checkout@v4
- name: Setup ruby
Expand All @@ -52,7 +48,6 @@ jobs:

tests:
needs:
- rubocop
- test
runs-on: ubuntu-latest
name: Test suite
Expand Down

0 comments on commit 33f00f2

Please sign in to comment.