Skip to content

Commit 0517d7f

Browse files
committed
👷 Fix CodeCov integration
1 parent e86da63 commit 0517d7f

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

.github/workflows/coverage.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ env:
44
K_SOUP_COV_MIN_BRANCH: 100
55
K_SOUP_COV_MIN_LINE: 100
66
K_SOUP_COV_MIN_HARD: true
7-
K_SOUP_COV_FORMATTERS: "html,rcov,lcov,json,tty"
8-
K_SOUP_COV_DO: true
9-
K_SOUP_COV_MULTI_FORMATTERS: true
7+
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty"
108
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
119

1210
on:
@@ -73,6 +71,30 @@ jobs:
7371
- name: Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }}
7472
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
7573

74+
# Do SaaS coverage uploads first
75+
- name: Upload coverage to Coveralls
76+
uses: coverallsapp/github-action@master
77+
with:
78+
github-token: ${{ secrets.GITHUB_TOKEN }}
79+
continue-on-error: ${{ matrix.experimental != 'false' }}
80+
81+
- name: Upload coverage to QLTY
82+
uses: qltysh/qlty-action/coverage@main
83+
with:
84+
coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}}
85+
files: coverage/.resultset.json
86+
continue-on-error: ${{ matrix.experimental != 'false' }}
87+
88+
# Build will fail here if coverage upload fails
89+
# which will hopefully be noticed for the lack of code coverage comments
90+
- name: Upload coverage to CodeCov
91+
uses: codecov/codecov-action@v5
92+
with:
93+
fail_ci_if_error: true # optional (default = false)
94+
token: ${{ secrets.CODECOV_TOKEN }}
95+
verbose: true # optional (default = false)
96+
97+
# Then PR comments
7698
- name: Code Coverage Summary Report
7799
uses: irongut/CodeCoverageSummary@v1.3.0
78100
if: ${{ github.event_name == 'pull_request' }}
@@ -95,23 +117,3 @@ jobs:
95117
recreate: true
96118
path: code-coverage-results.md
97119
continue-on-error: ${{ matrix.experimental != 'false' }}
98-
99-
- name: Upload coverage to Coveralls
100-
uses: coverallsapp/github-action@master
101-
with:
102-
github-token: ${{ secrets.GITHUB_TOKEN }}
103-
continue-on-error: ${{ matrix.experimental != 'false' }}
104-
105-
- name: Upload coverage to QLTY
106-
uses: qltysh/qlty-action/coverage@main
107-
with:
108-
coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}}
109-
files: coverage/.resultset.json
110-
continue-on-error: ${{ matrix.experimental != 'false' }}
111-
112-
- name: Upload coverage to CodeCov
113-
uses: codecov/codecov-action@v5
114-
with:
115-
fail_ci_if_error: true # optional (default = false)
116-
token: ${{ secrets.CODECOV_TOKEN }}
117-
verbose: true # optional (default = false)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ or one of the others at the head of this README.
668668
[🔑cc-cov]: https://qlty.sh/gh/oauth-xx/projects/oauth2
669669
[🔑cc-covi♻️]: https://qlty.sh/badges/d3370c2c-8791-4202-9759-76f527f76005/test_coverage.svg
670670
[🔑codecov]: https://codecov.io/gh/oauth-xx/oauth2
671-
[🔑codecovi♻️]: https://codecov.io/gh/oauth-xx/oauth2/branch/main/graph/badge.svg?token=bNqSzNiuo2
671+
[🔑codecovi♻️]: https://codecov.io/gh/oauth-xx/oauth2/graph/badge.svg?token=bNqSzNiuo2
672672
[🔑coveralls]: https://coveralls.io/github/oauth-xx/oauth2?branch=main
673673
[🔑coveralls-img]: https://coveralls.io/repos/github/oauth-xx/oauth2/badge.svg?branch=main
674674
[🔑depfu]: https://depfu.com/github/oauth-xx/oauth2?project_id=5884

0 commit comments

Comments
 (0)