Skip to content

Commit 99c0040

Browse files
authored
Add TruffleRuby in CI (#1079)
* Add TruffleRuby in CI * Remove continue-on-error in unstable.yml workflow * This is a daily job, the failures only appear in the Actions tab so there seems to be little value to hide it. * Add comment about running only rake spec on truffleruby
1 parent a9a9dcc commit 99c0040

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

.github/workflows/stable.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- '3.2'
2020
- '3.3'
2121
- jruby-9.4
22+
- truffleruby
2223

2324
steps:
2425
- uses: actions/checkout@v4
@@ -28,5 +29,13 @@ jobs:
2829
ruby-version: ${{ matrix.ruby-version }}
2930
bundler-cache: true
3031

31-
- run: |
32-
bundle exec rake
32+
- name: Run tests
33+
run: bundle exec rake
34+
if: matrix.ruby-version != 'truffleruby'
35+
36+
# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
37+
# There is no value to rerun rubocop here.
38+
# cucumber fails because it uses an old childprocess which depends on fork.
39+
- name: Run specs (truffleruby)
40+
run: bundle exec rake spec
41+
if: matrix.ruby-version == 'truffleruby'

.github/workflows/unstable.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
ruby-version:
1818
- ruby-head
1919
- jruby-head
20+
- truffleruby-head
2021

2122
steps:
2223
- uses: actions/checkout@v4
@@ -25,8 +26,14 @@ jobs:
2526
with:
2627
ruby-version: ${{ matrix.ruby-version }}
2728
bundler-cache: true
28-
continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }}
2929

30-
- run: |
31-
bundle exec rake
32-
continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }}
30+
- name: Run tests
31+
run: bundle exec rake
32+
if: matrix.ruby-version != 'truffleruby-head'
33+
34+
# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
35+
# There is no value to rerun rubocop here.
36+
# cucumber fails because it uses an old childprocess which depends on fork.
37+
- name: Run specs (truffleruby)
38+
run: bundle exec rake spec
39+
if: matrix.ruby-version == 'truffleruby-head'

spec/return_codes_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
end
3535

3636
it "prints a message to STDERR" do
37+
# https://github.com/oracle/truffleruby/issues/3535
38+
skip "fails on truffleruby" if RUBY_ENGINE == "truffleruby" && command.include?("testunit_bad.rb")
3739
expect(@stderr).to match(/stopped.+SimpleCov.+previous.+error/i)
3840
end
3941
end

0 commit comments

Comments
 (0)