File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 11name : CI - Run Vitest
22on :
3- push :
4- branches : [main]
53 pull_request :
6- branches : [main]
74jobs :
85 test :
96 runs-on : ubuntu-latest
7+ permissions :
8+ contents : read
9+ pull-requests : write
1010 strategy :
1111 matrix :
1212 node-version : [20.x, 22.x, 24.x]
1313 steps :
1414 - uses : actions/checkout@v5
15- - name : Use Node.js ${{ matrix.node-version }}
15+ - name : Install node ${{ matrix.node-version }}
1616 uses : actions/setup-node@v4
1717 with :
1818 node-version : ${{ matrix.node-version }}
19- cache : " npm"
2019 - name : Install dependencies
2120 run : npm ci
22- - name : Run vitests with coverage
23- run : npm run test
21+ - name : Run tests
22+ run : npx vitest --coverage.enabled true
2423 - name : Code coverage summary
2524 uses : irongut/CodeCoverageSummary@v1.3.0
2625 with :
2726 filename : coverage/coverage.cobertura.xml
28- - name : Add coverage pr comment
29- uses : marocchino/sticky-pull-request-comment@v2
30- if : github.event_name == 'pull_request'
31- with :
32- recreate : true
33- path : code-coverage-result.md
27+ - name : " Report Coverage"
28+ if : always()
29+ uses : davelosert/vitest-coverage-report-action@v2
You can’t perform that action at this time.
0 commit comments