Skip to content

Commit 8b4c340

Browse files
authored
Merge pull request #704 from johnnyshields/fix-truffle-ruby
v2.0: Fix TruffleRuby simplecov
2 parents 3229214 + 3260b0a commit 8b4c340

3 files changed

Lines changed: 27 additions & 40 deletions

File tree

.github/workflows/rubocop.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ name: ruby-saml CI
33
on: [push, pull_request]
44

55
jobs:
6+
rubocop:
7+
runs-on: ubuntu-latest
8+
env:
9+
CI: true
10+
TESTOPTS: '-v'
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Ruby 3.3
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 3.3
17+
bundler-cache: true
18+
- name: Install dependencies
19+
run: bundle install
20+
- name: Run RuboCop
21+
run: bundle exec rubocop --parallel
22+
623
test:
724
name: Unit test
825
strategy:
@@ -40,9 +57,6 @@ jobs:
4057

4158
- name: Coveralls
4259
uses: coverallsapp/github-action@master
43-
# 2023/03/07 - Simplecov is not working on TruffleRuby.
44-
# TruffleRuby tests are otherwise passing.
45-
if: ${{ matrix.ruby-version != 'truffleruby' }}
4660
with:
4761
github-token: ${{ secrets.github_token }}
4862
parallel: true

test/test_helper.rb

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# 2023/03/07 - Simplecov is not working on TruffleRuby.
2-
unless defined?(TruffleRuby)
3-
require 'simplecov'
4-
require 'simplecov-lcov'
5-
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
6-
SimpleCov::Formatter::LcovFormatter.config.output_directory = 'coverage'
7-
SimpleCov::Formatter::LcovFormatter.config.lcov_file_name = 'lcov.info'
8-
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
9-
SimpleCov.start do
10-
add_filter "test/"
11-
add_filter "vendor/"
12-
add_filter "lib/ruby_saml/logging.rb"
13-
end
1+
require 'simplecov'
2+
require 'simplecov-lcov'
3+
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
4+
SimpleCov::Formatter::LcovFormatter.config.output_directory = 'coverage'
5+
SimpleCov::Formatter::LcovFormatter.config.lcov_file_name = 'lcov.info'
6+
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
7+
SimpleCov.start do
8+
add_filter "test/"
9+
add_filter "vendor/"
10+
add_filter "lib/ruby_saml/logging.rb"
1411
end
1512

1613
require 'stringio'

0 commit comments

Comments
 (0)