Skip to content

Commit 552bffe

Browse files
Add Ruby version matrix to test on both 3.4 and 4.0
Implements a GitHub Actions matrix strategy to test on multiple Ruby versions: - Ruby 3.4 (current stable maintenance version) - Ruby 4.0 (latest stable version) Benefits: - Ensures compatibility with both Ruby 3.4 and 4.0 - Catches Ruby version-specific issues early - Demonstrates project works across Ruby versions - Provides confidence for users on different Ruby versions - fail-fast: false allows all versions to run even if one fails The matrix runs tests in parallel, so CI time remains similar while providing significantly more coverage. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent a7589d3 commit 552bffe

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/ruby.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@ name: Serverspec
33
on: push
44

55
jobs:
6-
build:
7-
6+
test:
87
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
ruby-version: ['3.4', '4.0']
12+
fail-fast: false
13+
14+
name: Ruby ${{ matrix.ruby-version }}
915

1016
steps:
1117
- uses: actions/checkout@v6
12-
- name: Set up Ruby 3.4
18+
- name: Set up Ruby ${{ matrix.ruby-version }}
1319
uses: ruby/setup-ruby@v1
1420
with:
15-
ruby-version: 3.4
21+
ruby-version: ${{ matrix.ruby-version }}
1622
bundler-cache: true
17-
- name: Run test
23+
- name: Run tests
1824
env:
1925
DOCKER_BUILDKIT: 1
2026
run: bundle exec rake

0 commit comments

Comments
 (0)