Skip to content

Commit 86e32ae

Browse files
committed
✅ Skip simplecov for non-CRuby engines
1 parent 53c0fdb commit 86e32ae

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ jobs:
3636
timeout-minutes: 5 # _should_ finish in under a minute
3737

3838
- uses: joshmfrankel/simplecov-check-action@main
39-
if: matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'
39+
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' &&
40+
!startsWith(matrix.ruby, 'truffleruby') && !startsWith(matrix.ruby, 'jruby') }}
4041
with:
4142
check_job_name: "SimpleCov - ${{ matrix.ruby }}"
4243
minimum_suite_coverage: 90

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gem "benchmark-driver", require: false
1919
gem "vernier", require: false, platform: :mri
2020

2121
group :test do
22-
gem "simplecov", require: false
23-
gem "simplecov-html", require: false
24-
gem "simplecov-json", require: false
22+
gem "simplecov", require: false, platform: :mri
23+
gem "simplecov-html", require: false, platform: :mri
24+
gem "simplecov-json", require: false, platform: :mri
2525
end

test/lib/helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
unless ENV["SIMPLECOV_DISABLE"] in /\A(1|y(es)?|t(rue)?)\z/i
1+
if !(ENV["SIMPLECOV_DISABLE"] in /\A(1|y(es)?|t(rue)?)\z/i) &&
2+
RUBY_ENGINE == "ruby" # C Ruby only
3+
24
require "simplecov"
35

46
# Cannot use ".simplecov" file: simplecov-json triggers a circular require.

0 commit comments

Comments
 (0)