forked from ricky0123/vad
-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (61 loc) · 1.94 KB
/
coverage.yml
File metadata and controls
71 lines (61 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Coverage
on:
push:
pull_request:
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
package: [packages/web, packages/react]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Run coverage
run: cd ${{ matrix.package }} && npm run test:coverage
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: (!cancelled())
with:
files: |
${{ matrix.package }}/test-results/**/*.xml
${{ matrix.package }}/test-results/**/*.trx
${{ matrix.package }}/test-results/**/*.json
check_name: Test Results (${{ matrix.package }})
continue-on-error: true
- name: Determine lcov path
id: lcov-path
run: |
if [ -f "${{ matrix.package }}/lcov.info" ]; then
echo "path=${{ matrix.package }}/lcov.info" >> $GITHUB_OUTPUT
elif [ -f "${{ matrix.package }}/coverage/lcov.info" ]; then
echo "path=${{ matrix.package }}/coverage/lcov.info" >> $GITHUB_OUTPUT
else
echo "path=${{ matrix.package }}/lcov.info" >> $GITHUB_OUTPUT
fi
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.package }}
parallel: true
file: ${{ steps.lcov-path.outputs.path }}
continue-on-error: true
finish:
needs: coverage
if: always()
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: true