Skip to content

Commit d1f0d86

Browse files
committed
add additional testing for older and newer versions of ruby
1 parent 0fbc112 commit d1f0d86

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/test.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,30 @@ on:
99

1010
jobs:
1111
test:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: ${{ matrix.ruby-version }}
25+
26+
- name: Install dependencies
27+
run: bundle install --retry=3
28+
29+
- name: Run tests
30+
run: bundle exec rspec spec/
1231

32+
publish:
33+
needs: test
1334
runs-on: ubuntu-latest
35+
if: startsWith(github.ref, 'refs/tags/')
1436

1537
steps:
1638
- uses: actions/checkout@v4
@@ -27,7 +49,6 @@ jobs:
2749
run: bundle exec rspec spec/
2850

2951
- name: Publish to RubyGems
30-
if: startsWith(github.ref, 'refs/tags/')
3152
run: |
3253
mkdir -p $HOME/.gem
3354
touch $HOME/.gem/credentials

0 commit comments

Comments
 (0)