Skip to content

Commit

Permalink
Update Ruby versions on GHA with ci_versions/all.json
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jun 3, 2022
1 parent 5fd0018 commit 62db7e6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@ name: test
on: [push, pull_request]

jobs:
build:
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/all.json' | jq -c '. + ["2.5"]')
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, head ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down

0 comments on commit 62db7e6

Please sign in to comment.