diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 891a4b7f..6e128b11 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -19,6 +19,7 @@ jobs: - '3.2' - '3.3' - jruby-9.4 + - truffleruby steps: - uses: actions/checkout@v4 @@ -28,5 +29,13 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - - run: | - bundle exec rake + - name: Run tests + run: bundle exec rake + if: matrix.ruby-version != 'truffleruby' + + # Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`. + # There is no value to rerun rubocop here. + # cucumber fails because it uses an old childprocess which depends on fork. + - name: Run specs (truffleruby) + run: bundle exec rake spec + if: matrix.ruby-version == 'truffleruby' diff --git a/.github/workflows/unstable.yml b/.github/workflows/unstable.yml index 70d676a0..037384c8 100644 --- a/.github/workflows/unstable.yml +++ b/.github/workflows/unstable.yml @@ -17,6 +17,7 @@ jobs: ruby-version: - ruby-head - jruby-head + - truffleruby-head steps: - uses: actions/checkout@v4 @@ -25,8 +26,14 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }} - - run: | - bundle exec rake - continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }} + - name: Run tests + run: bundle exec rake + if: matrix.ruby-version != 'truffleruby-head' + + # Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`. + # There is no value to rerun rubocop here. + # cucumber fails because it uses an old childprocess which depends on fork. + - name: Run specs (truffleruby) + run: bundle exec rake spec + if: matrix.ruby-version == 'truffleruby-head' diff --git a/spec/return_codes_spec.rb b/spec/return_codes_spec.rb index 36b2dd31..527388f1 100644 --- a/spec/return_codes_spec.rb +++ b/spec/return_codes_spec.rb @@ -34,6 +34,8 @@ end it "prints a message to STDERR" do + # https://github.com/oracle/truffleruby/issues/3535 + skip "fails on truffleruby" if RUBY_ENGINE == "truffleruby" && command.include?("testunit_bad.rb") expect(@stderr).to match(/stopped.+SimpleCov.+previous.+error/i) end end