Skip to content

Commit f01bd42

Browse files
authored
CI: Introduce ruby_versions.yml to add supported Ruby versions automatically (#21)
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent e7380b1 commit f01bd42

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/run_spec.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,32 @@ on:
55
branches: [master]
66
pull_request:
77
branches: [master]
8+
schedule:
9+
- cron: '0 0 1 * *'
810

911
jobs:
12+
ruby-versions:
13+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
14+
with:
15+
engine: cruby
16+
min_version: 3.1
1017
build:
18+
needs: ruby-versions
1119
runs-on: ubuntu-latest
12-
continue-on-error: ${{ matrix.experimental }}
20+
continue-on-error: ${{ matrix.ruby == 'head' }}
1321
strategy:
1422
matrix:
15-
ruby_version: [ '3.4', '3.3', '3.2', '3.1' ]
16-
experimental: [false]
17-
include:
18-
- ruby_version: head
19-
os: ubuntu-latest
20-
experimental: true
23+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
2124
env:
2225
LANG: en_US.UTF-8
2326
steps:
2427
- uses: actions/checkout@v6
25-
- name: Set up Ruby ${{ matrix.ruby_version }}
28+
- name: Set up Ruby ${{ matrix.ruby }}
2629
uses: ruby/setup-ruby@v1
2730
with:
28-
ruby-version: ${{ matrix.ruby_version }}
31+
ruby-version: ${{ matrix.ruby }}
2932
- name: Install dependencies
3033
run: |
31-
gem install bundler --no-document
3234
bundle install --jobs 4 --retry 3
3335
- name: Run test
3436
run: |

0 commit comments

Comments
 (0)