Skip to content

Commit 91c35b1

Browse files
authored
Merge pull request #79 from ruby/ci-versions
Update Ruby versions on GHA with ci_versions/all.json
2 parents ce2a438 + 25df6c3 commit 91c35b1

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,28 @@ name: Test
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
runs-on: ${{ matrix.os }}
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/all.json' | jq -c '. + ["2.5"]')
14+
echo "::set-output name=value::${versions}"
15+
test:
16+
needs: ruby-versions
17+
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
818
strategy:
919
matrix:
10-
ruby: [ 'head', '3.0', '2.7', '2.6', '2.5' ]
11-
os: [ 'ubuntu-latest', 'windows-latest' ]
20+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
21+
os: [ 'ubuntu-latest' ]
1222
include:
13-
- { os: macos-latest, ruby: '2.6' }
14-
- { os: ubuntu-latest, ruby: 'jruby-head' }
15-
- { os: ubuntu-latest, ruby: 'jruby-9.2' }
23+
- { os: macos-latest, ruby: 'head' }
24+
- { os: macos-latest, ruby: 'jruby-head' }
25+
- { os: macos-latest, ruby: 'truffleruby-head' }
26+
- { os: windows-latest, ruby: 'head' }
27+
runs-on: ${{ matrix.os }}
1628
steps:
1729
- uses: actions/checkout@v3
1830
- name: Set up Ruby ${{ matrix.ruby }}

0 commit comments

Comments
 (0)