diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19d1b0f..0cc63be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,10 @@ env: jobs: - rubocop: - runs-on: ubuntu-latest + rubocop_and_matrix: + runs-on: ubuntu-24.04 + outputs: + ruby: ${{ steps.ruby.outputs.versions }} steps: - uses: actions/checkout@v4 - name: Install Ruby ${{ matrix.ruby }} @@ -22,20 +24,17 @@ jobs: bundler-cache: true - name: Run Rubocop run: bundle exec rake rubocop + - id: ruby + uses: voxpupuli/ruby-version@v1 test: - runs-on: ubuntu-latest + name: "Ruby ${{ matrix.ruby }}" + runs-on: ubuntu-24.04 + needs: rubocop_and_matrix strategy: fail-fast: false matrix: - ruby: - - "2.7" - - "3.0" - - "3.1" - - "3.2" - - "3.3" - - "3.4" - name: Ruby ${{ matrix.ruby }} + ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }} steps: - uses: actions/checkout@v4 - name: Install Ruby ${{ matrix.ruby }} @@ -50,9 +49,9 @@ jobs: tests: needs: - - rubocop + - rubocop_and_matrix - test - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: Test suite steps: - run: echo Test suite completed