File tree 1 file changed +39
-0
lines changed 1 file changed +39
-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 : Install lcov
47
+ run : sudo apt install -yq lcov
48
+
49
+ - name : Merge coverage reports
50
+ run : |
51
+ lcov --capture --directory . --no-external --output-file lcov-cpp.info
52
+ lcov --add-tracefile lcov-cpp.info --add-tracefile lcov.info --output-file lcov.info
53
+ lcov --remove lcov.info "*/node_modules/*" --output-file lcov.info
54
+
55
+ - name : " Send to Codacy"
56
+ uses : codacy/codacy-coverage-reporter-action@v1
57
+ with :
58
+ coverage-reports : lcov.info
59
+ project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
60
+
22
61
test :
23
62
strategy :
24
63
matrix :
You can’t perform that action at this time.
0 commit comments