Skip to content

Commit

Permalink
Merge pull request #704 from johnnyshields/fix-truffle-ruby
Browse files Browse the repository at this point in the history
v2.0: Fix TruffleRuby simplecov
  • Loading branch information
pitbulk authored Jul 10, 2024
2 parents 3229214 + 3260b0a commit 8b4c340
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 40 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/rubocop.yml

This file was deleted.

20 changes: 17 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ name: ruby-saml CI
on: [push, pull_request]

jobs:
rubocop:
runs-on: ubuntu-latest
env:
CI: true
TESTOPTS: '-v'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run RuboCop
run: bundle exec rubocop --parallel

test:
name: Unit test
strategy:
Expand Down Expand Up @@ -40,9 +57,6 @@ jobs:

- name: Coveralls
uses: coverallsapp/github-action@master
# 2023/03/07 - Simplecov is not working on TruffleRuby.
# TruffleRuby tests are otherwise passing.
if: ${{ matrix.ruby-version != 'truffleruby' }}
with:
github-token: ${{ secrets.github_token }}
parallel: true
Expand Down
23 changes: 10 additions & 13 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# 2023/03/07 - Simplecov is not working on TruffleRuby.
unless defined?(TruffleRuby)
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov::Formatter::LcovFormatter.config.output_directory = 'coverage'
SimpleCov::Formatter::LcovFormatter.config.lcov_file_name = 'lcov.info'
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start do
add_filter "test/"
add_filter "vendor/"
add_filter "lib/ruby_saml/logging.rb"
end
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov::Formatter::LcovFormatter.config.output_directory = 'coverage'
SimpleCov::Formatter::LcovFormatter.config.lcov_file_name = 'lcov.info'
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start do
add_filter "test/"
add_filter "vendor/"
add_filter "lib/ruby_saml/logging.rb"
end

require 'stringio'
Expand Down

0 comments on commit 8b4c340

Please sign in to comment.