Skip to content

Commit 090a527

Browse files
committed
👷 Update coverage workflow
1 parent 4c33170 commit 090a527

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/coverage.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name: Test Coverage
33
permissions:
44
contents: read
55
pull-requests: write
6+
id-token: write
67

78
env:
89
K_SOUP_COV_MIN_BRANCH: 100
910
K_SOUP_COV_MIN_LINE: 100
1011
K_SOUP_COV_MIN_HARD: true
11-
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty"
12+
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,tty"
1213
K_SOUP_COV_DO: true
1314
K_SOUP_COV_MULTI_FORMATTERS: true
14-
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
15+
K_SOUP_COV_COMMAND_NAME: "Test Coverage"
1516

1617
on:
1718
push:
@@ -66,7 +67,7 @@ jobs:
6667

6768
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
6869
# We need to do this first to get appraisal installed.
69-
# NOTE: This does not use the primary Gemfile at all.
70+
# NOTE: This does not use the main Gemfile at all.
7071
- name: Install Root Appraisal
7172
run: bundle
7273
- name: Appraisal for ${{ matrix.appraisal }}
@@ -76,22 +77,34 @@ jobs:
7677

7778
# Do SaaS coverage uploads first
7879
- name: Upload coverage to Coveralls
80+
if: ${{ !env.ACT }}
7981
uses: coverallsapp/github-action@master
8082
with:
8183
github-token: ${{ secrets.GITHUB_TOKEN }}
8284
continue-on-error: ${{ matrix.experimental != 'false' }}
8385

8486
- name: Upload coverage to QLTY
85-
uses: qltysh/qlty-action/coverage@main
87+
if: ${{ !env.ACT }}
88+
uses: qltysh/qlty-action/coverage@v1
8689
with:
8790
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
8891
files: coverage/.resultset.json
8992
continue-on-error: ${{ matrix.experimental != 'false' }}
9093

94+
# Build will fail here if coverage upload fails
95+
# which will hopefully be noticed for the lack of code coverage comments
96+
- name: Upload coverage to CodeCov
97+
uses: codecov/codecov-action@v5
98+
with:
99+
use_oidc: true
100+
fail_ci_if_error: true # optional (default = false)
101+
files: coverage/lcov.info,coverage/coverage.xml
102+
verbose: true # optional (default = false)
103+
91104
# Then PR comments
92105
- name: Code Coverage Summary Report
106+
if: ${{ !env.ACT && github.event_name == 'pull_request' }}
93107
uses: irongut/[email protected]
94-
if: ${{ github.event_name == 'pull_request' }}
95108
with:
96109
filename: ./coverage/coverage.xml
97110
badge: true
@@ -106,7 +119,7 @@ jobs:
106119

107120
- name: Add Coverage PR Comment
108121
uses: marocchino/sticky-pull-request-comment@v2
109-
if: ${{ github.event_name == 'pull_request' }}
122+
if: ${{ !env.ACT && github.event_name == 'pull_request' }}
110123
with:
111124
recreate: true
112125
path: code-coverage-results.md

0 commit comments

Comments
 (0)