Commit 12b9eec 1 parent 347eb6f commit 12b9eec Copy full SHA for 12b9eec
File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 19
19
- name : Lint
20
20
run : npm run lint
21
21
22
+ coverage :
23
+ name : Report coverage
24
+ runs-on : ubuntu-latest
25
+
26
+ steps :
27
+ - name : Checkout
28
+ uses : actions/checkout@v4
29
+ with :
30
+ submodules : true
31
+
32
+ - name : Use Node.js 20
33
+ uses : actions/setup-node@v4
34
+ with :
35
+ cache : npm
36
+ node-version : 20
37
+
38
+ - name : Install dependencies
39
+ run : npm ci
40
+ env :
41
+ npm_config_debug=true
42
+
43
+ - name : Run tests
44
+ run : node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info test.cjs
45
+
46
+ - name : Merge coverage reports
47
+ run : |
48
+ sudo apt install -yq lcov
49
+ lcov --capture --directory build/ --no-external --output-file lcov-cpp.info
50
+ lcov --add-tracefile lcov-cpp.info --add-tracefile lcov.info --output-file lcov.info
51
+ lcov --remove lcov.info "*/node_modules/*" --output-file lcov.info
52
+
53
+ - name : " Send to Codacy"
54
+ uses : codacy/codacy-coverage-reporter-action@v1
55
+ with :
56
+ coverage-reports : lcov.info
57
+ project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
58
+
22
59
test :
23
60
strategy :
24
61
matrix :
You can’t perform that action at this time.
0 commit comments