File tree Expand file tree Collapse file tree 1 file changed +31
-8
lines changed Expand file tree Collapse file tree 1 file changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -163,25 +163,48 @@ jobs:
163
163
164
164
- name : Run tests
165
165
shell : bash
166
- run : npm run test-ci
166
+ run : |
167
+ npm run test-ci
168
+ cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
167
169
168
170
- name : Lint code
169
171
if : steps.list_env.outputs.eslint != ''
170
172
run : npm run lint
171
173
172
174
- name : Collect code coverage
173
- uses : coverallsapp/github-action@master
175
+ run : |
176
+ mv ./coverage "./${{ matrix.name }}"
177
+ mkdir ./coverage
178
+ mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
179
+
180
+ - name : Upload code coverage
181
+ uses : actions/upload-artifact@v3
174
182
with :
175
- github-token : ${{ secrets.GITHUB_TOKEN }}
176
- flag-name : run-${{ matrix.test_number }}
177
- parallel : true
183
+ name : coverage
184
+ path : ./coverage
185
+ retention-days : 1
178
186
179
187
coverage :
180
188
needs : test
181
189
runs-on : ubuntu-latest
182
190
steps :
183
- - name : Upload code coverage
191
+ - uses : actions/checkout@v3
192
+
193
+ - name : Install lcov
194
+ shell : bash
195
+ run : sudo apt-get -y install lcov
196
+
197
+ - name : Collect coverage reports
198
+ uses : actions/download-artifact@v3
199
+ with :
200
+ name : coverage
201
+ path : ./coverage
202
+
203
+ - name : Merge coverage reports
204
+ shell : bash
205
+ run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
206
+
207
+ - name : Upload coverage report
184
208
uses : coverallsapp/github-action@master
185
209
with :
186
- github-token : ${{ secrets.github_token }}
187
- parallel-finished : true
210
+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments