Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ on:
jobs:
tests:
uses: Invoca/ruby-test-matrix-workflow/.github/workflows/ruby-test-matrix.yml@main
secrets: inherit
with:
Comment thread
dep marked this conversation as resolved.
pre-test-hook: "mkdir -p tmp"
23 changes: 23 additions & 0 deletions spec/simplecov_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

unless ENV["NO_COVERAGE"] == "true"
require "simplecov"

SimpleCov.start do
add_filter "/spec/"
track_files "lib/**/*.rb"

if ENV["GITHUB_ACTIONS"]
require "simplecov-lcov"

SimpleCov::Formatter::LcovFormatter.config do |config|
config.report_with_single_file = true
config.single_report_path = "coverage/lcov.info"
end

formatter SimpleCov::Formatter::LcovFormatter
else
formatter SimpleCov::Formatter::HTMLFormatter
end
end
end
Comment thread
dep marked this conversation as resolved.
18 changes: 2 additions & 16 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
# frozen_string_literal: true

require_relative "simplecov_helper"
Comment thread
dep marked this conversation as resolved.

require 'rspec_junit_formatter'
require 'process_settings'

require 'pry'

if ENV['GITHUB_ACTIONS'].presence
require 'simplecov'
require 'simplecov-lcov'

SimpleCov.start do
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = 'coverage/lcov.info'
end

formatter SimpleCov::Formatter::LcovFormatter

add_filter %w[version.rb initializer.rb]
end
end

RSpec.configure do |config|
config.add_formatter :progress
config.add_formatter RspecJunitFormatter, ENV['JUNIT_OUTPUT'].presence || 'spec/reports/rspec.xml'
Expand Down
Loading