Skip to content

Commit

Permalink
re-enable cc test reporting (#48)
Browse files Browse the repository at this point in the history
* re-enable cc test reporting

* simplecov json output in ci

* only report for latest

* badges
  • Loading branch information
mattyr authored Nov 5, 2023
1 parent 3d13429 commit d4e579d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ jobs:
- name: Run tests
run: bundle exec rake
timeout-minutes: 5
- name: Report code coverage
if: ${{ matrix.ruby-version == '3.2' && matrix.sidekiq-version == '7.1' }}
continue-on-error: true
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ gem 'sidekiq', sidekiq_dep

group :test do
gem "simplecov"
gem "simplecov_json_formatter"
end
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

[![CI](https://github.com/mattyr/sidecloq/actions/workflows/ci.yml/badge.svg)](https://github.com/mattyr/sidecloq/actions/workflows/ci.yml)
[![Gem Version](https://badge.fury.io/rb/sidecloq.svg)](https://badge.fury.io/rb/sidecloq)
[![Test Coverage](https://codeclimate.com/github/mattyr/sidecloq/badges/coverage.svg)](https://codeclimate.com/github/mattyr/sidecloq/coverage)
[![Test Coverage](https://api.codeclimate.com/v1/badges/65e94000ebd0b9043b1d/test_coverage)](https://codeclimate.com/github/mattyr/sidecloq/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/65e94000ebd0b9043b1d/maintainability)](https://codeclimate.com/github/mattyr/sidecloq/maintainability)

Recurring / Periodic / Scheduled / Cron job extension for
[Sidekiq](https://github.com/mperham/sidekiq)
Expand Down
1 change: 1 addition & 0 deletions gemfiles/sidekiq_6.4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem "sidekiq", "~> 6.4.0"

group :test do
gem "simplecov"
gem "simplecov_json_formatter"
end

platforms :mri, :rbx do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/sidekiq_6.5.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem "sidekiq", "~> 6.5.0"

group :test do
gem "simplecov"
gem "simplecov_json_formatter"
end

platforms :mri, :rbx do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/sidekiq_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem "sidekiq", "~> 7.0.0"

group :test do
gem "simplecov"
gem "simplecov_json_formatter"
end

platforms :mri, :rbx do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/sidekiq_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem "sidekiq", "~> 7.1.0"

group :test do
gem "simplecov"
gem "simplecov_json_formatter"
end

platforms :mri, :rbx do
Expand Down
4 changes: 4 additions & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
require 'simplecov'
if ENV['CI']
require 'simplecov_json_formatter'
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
end
SimpleCov.start

$TESTING = true
Expand Down

0 comments on commit d4e579d

Please sign in to comment.