Skip to content

Commit

Permalink
Migrate from lcov to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
iwdt committed Feb 22, 2024
1 parent 314e105 commit 5e8f34a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
run: bundle exec steep check
- name: Test with RSpec
run: bundle exec rspec
- name: Add code coverage comment
uses: romeovs/lcov-reporter-action@v0.2.21
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
lcov-file: ./coverage/lcov/shikikit.lcov
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ group :test do
gem 'rack-test'
gem 'rspec'
gem 'simplecov'
gem 'simplecov-lcov'
gem 'simplecov-cobertura'
gem 'vcr'
gem 'webmock'
end
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ GEM
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
snaky_hash (2.0.1)
hashie
Expand Down Expand Up @@ -195,7 +197,7 @@ DEPENDENCIES
shikimori-api!
shikimori-oauth2!
simplecov
simplecov-lcov
simplecov-cobertura
steep
typeprof
vcr
Expand Down
8 changes: 2 additions & 6 deletions spec/support/simplecov_helper.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# frozen_string_literal: true

require 'simplecov'
require 'simplecov-cobertura'

if ENV['CI']
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
end
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter if ENV['CI']

SimpleCov.start do
add_group 'API', ['lib/shikimori-api.rb', 'lib/shikimori/api.rb', 'lib/shikimori/api']
Expand Down

0 comments on commit 5e8f34a

Please sign in to comment.