diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ecc4442..5765510 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,21 @@ name: test on: [push, pull_request] jobs: + ruby-versions: + runs-on: ubuntu-latest + outputs: + versions: ${{ steps.versions.outputs.value }} + steps: + - id: versions + run: | + versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. + ["2.6", "2.5", "2.4"]') + echo "::set-output name=value::${versions}" test: + needs: ruby-versions + name: build (${{ matrix.ruby }} / ${{ matrix.os }}) strategy: matrix: - ruby: [ 3.1, '3.0', 2.7, 2.6, 2.5, 2.4, head ] + ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: