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:
163163
164164 - name : Run tests
165165 shell : bash
166- run : npm run test-ci
166+ run : |
167+ npm run test-ci
168+ cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
167169
168170 - name : Lint code
169171 if : steps.list_env.outputs.eslint != ''
170172 run : npm run lint
171173
172174 - 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
174182 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
178186
179187 coverage :
180188 needs : test
181189 runs-on : ubuntu-latest
182190 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
184208 uses : coverallsapp/github-action@master
185209 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