Skip to content

Commit eaa0cc0

Browse files
authored
Merge pull request #25 from ruby/ci-versions
Update Ruby versions on GHA with ci_versions/all.json
2 parents fc56707 + 7ac6f1c commit eaa0cc0

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@ name: test
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
ruby-versions:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
versions: ${{ steps.versions.outputs.value }}
10+
steps:
11+
- id: versions
12+
run: |
13+
versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. + ["2.5", "jruby"]')
14+
echo "::set-output name=value::${versions}"
15+
test:
16+
needs: ruby-versions
717
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
818
strategy:
919
matrix:
10-
ruby: [ '3.0', 2.7, 2.6, 2.5, head, jruby ]
20+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
1121
os: [ ubuntu-latest, macos-latest, windows-latest ]
1222
exclude:
1323
- { os: windows-latest, ruby: head }

0 commit comments

Comments
 (0)