From 552bffececf5accaf6ed769320f4f8f562c9dc99 Mon Sep 17 00:00:00 2001 From: Christopher Horrell Date: Tue, 10 Feb 2026 18:09:07 -0500 Subject: [PATCH] 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> --- .github/workflows/ruby.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9f44032..c29c892 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -3,18 +3,24 @@ name: Serverspec on: push jobs: - build: - + test: runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: ['3.4', '4.0'] + fail-fast: false + + name: Ruby ${{ matrix.ruby-version }} steps: - uses: actions/checkout@v6 - - name: Set up Ruby 3.4 + - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4 + ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - - name: Run test + - name: Run tests env: DOCKER_BUILDKIT: 1 run: bundle exec rake