File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Code Coverage
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test-and-coverage :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Node.js
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : 20
23+
24+ - name : Install dependencies
25+ run : npm install
26+
27+ - name : Run tests with coverage
28+ run : npm test -- --coverage
29+
30+ - name : Upload coverage to Codecov
31+ uses : codecov/codecov-action@v5.1.2
32+ with :
33+ token : ${{ secrets.CODECOV_TOKEN }} # Set in GitHub repository secrets
34+ files : ./coverage/lcov.info # Adjust path if necessary
35+ flags : unittests # Optional flags for tracking different types of tests
36+ name : codecov-coverage-report # Optional, useful for identifying reports
37+ fail_ci_if_error : true # Fails CI if Codecov upload fails
You can’t perform that action at this time.
0 commit comments