From aa0242d3995787b2580ff099b6f85213505ea773 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 2 Dec 2025 20:00:58 -0800 Subject: [PATCH 1/2] Increase CI testing * Test on JRuby * Run Minitest 4 tests only on Ruby 2.7 and 4.0 (oldest and newest) * Also run Minitest 5 tests on macOS for Ruby 2.7 and 4.0 * Set fail-fast to false, making it easy to see all test failures, instead of only the first process to fail * Update actions/checkout to v6 * Use an explicit test task Ideas taken from #101. I avoided the full matrix testing approach as I think that results in too many test suites. --- .github/workflows/ruby-ci.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ruby-ci.yml b/.github/workflows/ruby-ci.yml index 9a79cae..b345e3c 100644 --- a/.github/workflows/ruby-ci.yml +++ b/.github/workflows/ruby-ci.yml @@ -10,11 +10,12 @@ on: jobs: test: - runs-on: ubuntu-latest strategy: + fail-fast: false matrix: + os: + - ubuntu-latest gemfile: - - minitest4 - minitest5 - test_unit_gem ruby: @@ -25,16 +26,23 @@ jobs: - ruby-3.3 - ruby-3.4 - ruby-4.0 + - jruby - truffleruby + include: + - { os: ubuntu-latest, gemfile: minitest4, ruby: ruby-2.7 } + - { os: ubuntu-latest, gemfile: minitest4, ruby: ruby-4.0 } + - { os: macos-latest, gemfile: minitest5, ruby: ruby-2.7 } + - { os: macos-latest, gemfile: minitest5, ruby: ruby-4.0 } + runs-on: ${{ matrix.os }} env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Install uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Test - run: bundle exec rake + run: bundle exec rake test From 97be1bd7d38bb2986cdaa1ca7d77322ac0a7268f Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 2 Dec 2025 20:14:45 -0800 Subject: [PATCH 2/2] Avoid test depending on older JRuby error message JRuby has been updated to use the same error message as CRuby. --- test/everything_test.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/everything_test.rb b/test/everything_test.rb index 4bd996e..276dff2 100644 --- a/test/everything_test.rb +++ b/test/everything_test.rb @@ -10,11 +10,7 @@ def test_missing_file_gives_a_decent_error_message output = m "examples/thisdoesnexist_test.rb" assert !$?.success? assert_match(/Failed loading test file/, output) - if defined? JRUBY_VERSION - assert_match(/no such file to load/, output) - else - assert_match(/cannot load such file/, output) - end + assert_match(/cannot load such file/, output) end def test_running_tests_within_a_subdirectory