Skip to content

Commit

Permalink
Fix TruffleRuby simplecov. Also move Rubocop into the core test.yml f…
Browse files Browse the repository at this point in the history
…ile.
  • Loading branch information
johnnyshields committed Jul 10, 2024
1 parent 3229214 commit 3260b0a
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 3260b0a

Please sign in to comment.