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,3 +6,4 @@ on:
jobs:
tests:
uses: Invoca/ruby-test-matrix-workflow/.github/workflows/ruby-test-matrix.yml@main
secrets: inherit
Comment thread
dep marked this conversation as resolved.
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
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"]
Comment thread
dep marked this conversation as resolved.
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
18 changes: 2 additions & 16 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
# frozen_string_literal: true

require_relative "simplecov_helper"

require 'rspec_junit_formatter'
require "active_record/data_classification"

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 RspecJunitFormatter, ENV['JUNIT_OUTPUT'].presence || 'spec/reports/rspec.xml'

Expand Down
Loading