diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fa2ab5..3ce9076 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,31 +10,33 @@ 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 + - id: ruby + uses: voxpupuli/ruby-version@v1 + test: + name: "Ruby ${{ matrix.ruby }}" runs-on: ubuntu-latest + needs: rubocop_and_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.rubocop_and_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 }} @@ -46,7 +48,6 @@ jobs: tests: needs: - - rubocop - test runs-on: ubuntu-latest name: Test suite