@@ -3,15 +3,16 @@ name: Test Coverage
3
3
permissions :
4
4
contents : read
5
5
pull-requests : write
6
+ id-token : write
6
7
7
8
env :
8
9
K_SOUP_COV_MIN_BRANCH : 100
9
10
K_SOUP_COV_MIN_LINE : 100
10
11
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"
12
13
K_SOUP_COV_DO : true
13
14
K_SOUP_COV_MULTI_FORMATTERS : true
14
- K_SOUP_COV_COMMAND_NAME : " RSpec Coverage"
15
+ K_SOUP_COV_COMMAND_NAME : " Test Coverage"
15
16
16
17
on :
17
18
push :
66
67
67
68
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
68
69
# 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.
70
71
- name : Install Root Appraisal
71
72
run : bundle
72
73
- name : Appraisal for ${{ matrix.appraisal }}
@@ -76,22 +77,34 @@ jobs:
76
77
77
78
# Do SaaS coverage uploads first
78
79
- name : Upload coverage to Coveralls
80
+ if : ${{ !env.ACT }}
79
81
uses : coverallsapp/github-action@master
80
82
with :
81
83
github-token : ${{ secrets.GITHUB_TOKEN }}
82
84
continue-on-error : ${{ matrix.experimental != 'false' }}
83
85
84
86
- name : Upload coverage to QLTY
85
- uses : qltysh/qlty-action/coverage@main
87
+ if : ${{ !env.ACT }}
88
+ uses : qltysh/qlty-action/coverage@v1
86
89
with :
87
90
token : ${{secrets.QLTY_COVERAGE_TOKEN}}
88
91
files : coverage/.resultset.json
89
92
continue-on-error : ${{ matrix.experimental != 'false' }}
90
93
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
+
91
104
# Then PR comments
92
105
- name : Code Coverage Summary Report
106
+ if : ${{ !env.ACT && github.event_name == 'pull_request' }}
93
107
94
- if : ${{ github.event_name == 'pull_request' }}
95
108
with :
96
109
filename : ./coverage/coverage.xml
97
110
badge : true
@@ -106,7 +119,7 @@ jobs:
106
119
107
120
- name : Add Coverage PR Comment
108
121
uses : marocchino/sticky-pull-request-comment@v2
109
- if : ${{ github.event_name == 'pull_request' }}
122
+ if : ${{ !env.ACT && github.event_name == 'pull_request' }}
110
123
with :
111
124
recreate : true
112
125
path : code-coverage-results.md
0 commit comments