1
1
name : Test Coverage
2
2
3
+ permissions :
4
+ contents : read
5
+ pull-requests : write
6
+
3
7
env :
4
8
K_SOUP_COV_MIN_BRANCH : 100
5
9
K_SOUP_COV_MIN_LINE : 100
6
10
K_SOUP_COV_MIN_HARD : true
7
- K_SOUP_COV_FORMATTERS : " html,rcov,lcov,json,tty"
11
+ K_SOUP_COV_FORMATTERS : " html,xml, rcov,lcov,json,tty"
8
12
K_SOUP_COV_DO : true
9
13
K_SOUP_COV_MULTI_FORMATTERS : true
10
14
K_SOUP_COV_COMMAND_NAME : " RSpec Coverage"
22
26
# Allow manually triggering the workflow.
23
27
workflow_dispatch :
24
28
25
- permissions :
26
- contents : read
27
-
28
29
# Cancels all previous workflow runs for the same branch that have not yet completed.
29
30
concurrency :
30
31
# The concurrency group contains the workflow name and the branch name.
73
74
- name : Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }}
74
75
run : bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
75
76
77
+ # Do SaaS coverage uploads first
78
+ - name : Upload coverage to Coveralls
79
+ uses : coverallsapp/github-action@master
80
+ with :
81
+ github-token : ${{ secrets.GITHUB_TOKEN }}
82
+ continue-on-error : ${{ matrix.experimental != 'false' }}
83
+
84
+ - name : Upload coverage to QLTY
85
+ uses : qltysh/qlty-action/coverage@main
86
+ with :
87
+ token : ${{secrets.QLTY_COVERAGE_TOKEN}}
88
+ files : coverage/.resultset.json
89
+ continue-on-error : ${{ matrix.experimental != 'false' }}
90
+
91
+ # Build will fail here if coverage upload fails
92
+ # which will hopefully be noticed for the lack of code coverage comments
93
+ - name : Upload coverage to CodeCov
94
+ uses : codecov/codecov-action@v5
95
+ with :
96
+ fail_ci_if_error : true # optional (default = false)
97
+ token : ${{ secrets.CODECOV_TOKEN }}
98
+ verbose : true # optional (default = false)
99
+
100
+ # Then PR comments
76
101
- name : Code Coverage Summary Report
77
102
78
103
if : ${{ github.event_name == 'pull_request' }}
@@ -95,23 +120,3 @@ jobs:
95
120
recreate : true
96
121
path : code-coverage-results.md
97
122
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)
0 commit comments