Skip to content

Commit

Permalink
Merge pull request #79 from ruby/ci-versions
Browse files Browse the repository at this point in the history
Update Ruby versions on GHA with ci_versions/all.json
  • Loading branch information
hsbt authored Jun 7, 2022
2 parents ce2a438 + 25df6c3 commit 91c35b1
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@ name: Test
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
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: [ 'head', '3.0', '2.7', '2.6', '2.5' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ 'ubuntu-latest' ]
include:
- { os: macos-latest, ruby: '2.6' }
- { os: ubuntu-latest, ruby: 'jruby-head' }
- { os: ubuntu-latest, ruby: 'jruby-9.2' }
- { os: macos-latest, ruby: 'head' }
- { os: macos-latest, ruby: 'jruby-head' }
- { os: macos-latest, ruby: 'truffleruby-head' }
- { os: windows-latest, ruby: 'head' }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby }}
Expand Down

0 comments on commit 91c35b1

Please sign in to comment.