mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
Merge pull request #68 from taichi-ishitani/introduce_codecov_action
Introduce Codecov action
This commit is contained in:
commit
2716579ff9
3 changed files with 11 additions and 6 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
@ -23,3 +23,7 @@ jobs:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- run: bundle exec rspec
|
- run: bundle exec rspec
|
||||||
|
- uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.ruby }}
|
||||||
|
file: ./coverage/coverage.xml
|
||||||
|
|
4
Gemfile
4
Gemfile
|
@ -1,8 +1,8 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
# CI-only dependencies go here
|
# CI-only dependencies go here
|
||||||
if ENV["CI"] == "true" && RUBY_ENGINE == "ruby"
|
if ENV["CI"] == "true"
|
||||||
gem "codecov", require: false, group: "test"
|
gem "simplecov-cobertura", require: false, group: "test"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Specify gem's dependencies in docile.gemspec
|
# Specify gem's dependencies in docile.gemspec
|
||||||
|
|
|
@ -6,10 +6,11 @@ begin
|
||||||
add_filter "/vendor/" # exclude gems which are cached in CI
|
add_filter "/vendor/" # exclude gems which are cached in CI
|
||||||
end
|
end
|
||||||
|
|
||||||
# On CI we publish coverage to codecov.io, except on JRuby and TruffleRuby
|
# On CI we publish coverage to codecov.io
|
||||||
if ENV["CI"] == "true" && RUBY_ENGINE == "ruby"
|
# To use codecov-action, we need to generate XML based covarage report
|
||||||
require "codecov"
|
if ENV["CI"] == "true"
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
require "simplecov-cobertura"
|
||||||
|
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
||||||
end
|
end
|
||||||
|
|
||||||
# Due to circular dependency (simplecov depends on docile), remove docile and require again below
|
# Due to circular dependency (simplecov depends on docile), remove docile and require again below
|
||||||
|
|
Loading…
Reference in a new issue