Skip to content

Commit c6f82df

Browse files
committed
Adds a matrix of ruby versions to run tests against
Signed-off-by: M. Scott Ford <[email protected]>
1 parent aae1fec commit c6f82df

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/ruby.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
name: Ruby CI
1+
name: Ruby
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
49

510
jobs:
611
build:
7-
812
runs-on: ubuntu-latest
13+
name: Ruby ${{ matrix.ruby }}
14+
strategy:
15+
matrix:
16+
ruby:
17+
- '3.2.2'
18+
- '3.1.4'
19+
- '3.0.6'
20+
- '2.7.7'
21+
- '2.6.6'
922

1023
steps:
1124
- uses: actions/checkout@v3
12-
- name: Set up Ruby 2.6
25+
- name: Set up Ruby ${{ matrix.ruby }}
1326
uses: ruby/setup-ruby@v1
1427
with:
15-
ruby-version: '2.6'
16-
- name: Build and test with Rake
17-
run: |
18-
gem install bundler
19-
bundle install --jobs 4 --retry 3
20-
bundle exec rake
28+
ruby-version: ${{ matrix.ruby }}
29+
bundler-cache: true
30+
- name: Run the default task
31+
run: bundle exec rake

0 commit comments

Comments
 (0)