File tree Expand file tree Collapse file tree 5 files changed +82
-9
lines changed Expand file tree Collapse file tree 5 files changed +82
-9
lines changed Original file line number Diff line number Diff line change 1- # TODO(bcoe): add similar job for Windows coverage.
21name : coverage-linux
32
43on :
54 pull_request :
5+ paths-ignore :
6+ - ' doc/**'
7+ - ' deps/**'
8+ - ' benchmark/**'
9+ - ' tools/**'
610 push :
711 branches :
812 - master
13+ paths-ignore :
14+ - ' doc/**'
15+ - ' deps/**'
16+ - ' benchmark/**'
17+ - ' tools/**'
918
1019env :
1120 PYTHON_VERSION : 3.9
1221 FLAKY_TESTS : dontcare
1322
1423jobs :
15- # TODO(bcoe): add support for C++ coverage.
1624 coverage-linux :
1725 runs-on : ubuntu-latest
1826 steps :
@@ -23,18 +31,21 @@ jobs:
2331 python-version : ${{ env.PYTHON_VERSION }}
2432 - name : Environment Information
2533 run : npx envinfo
34+ - name : Install gcovr
35+ run : pip install gcovr==4.2
2636 - name : Build
27- run : make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
37+ run : make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage "
2838 # TODO(bcoe): fix the couple tests that fail with the inspector enabled.
2939 # The cause is most likely coverage's use of the inspector.
3040 - name : Test
31- run : NODE_V8_COVERAGE=coverage/tmp make run-ci -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0
32- - name : Report
41+ run : NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0
42+ - name : Report JS
3343 run : npx c8 report --check-coverage
34- - name : Output file count
35- run : ls -l coverage/tmp/ | wc -l
44+ - name : Report C++
45+ run : cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
46+ # Clean temporary output from gcov and c8, so that it's not uploaded:
3647 - name : Clean tmp
37- run : rm -rf coverage/tmp
48+ run : rm -rf coverage/tmp && rm -rf out
3849 - name : Upload
3950 uses : codecov/codecov-action@v1
4051 with :
Original file line number Diff line number Diff line change 1+ name : coverage-windows
2+
3+ on :
4+ pull_request :
5+ paths-ignore :
6+ - ' doc/**'
7+ - ' deps/**'
8+ - ' benchmark/**'
9+ - ' tools/**'
10+ push :
11+ branches :
12+ - master
13+ paths-ignore :
14+ - ' doc/**'
15+ - ' deps/**'
16+ - ' benchmark/**'
17+ - ' tools/**'
18+
19+ env :
20+ PYTHON_VERSION : 3.9
21+ FLAKY_TESTS : dontcare
22+
23+ jobs :
24+ coverage-windows :
25+ runs-on : windows-latest
26+ steps :
27+ - uses : actions/checkout@v2
28+ - name : Set up Python ${{ env.PYTHON_VERSION }}
29+ uses : actions/setup-python@v2
30+ with :
31+ python-version : ${{ env.PYTHON_VERSION }}
32+ - name : Install deps
33+ run : choco install nasm
34+ - name : Environment Information
35+ run : npx envinfo
36+ - name : Build
37+ run : ./vcbuild.bat
38+ # TODO(bcoe): investigate tests that fail with coverage enabled
39+ # on Windows.
40+ - name : Test
41+ run : ./vcbuild.bat test-ci-js; node -e 'process.exit(0)'
42+ env :
43+ NODE_V8_COVERAGE : ./coverage/tmp
44+ - name : Report
45+ run : npx c8 report
46+ - name : Clean tmp
47+ run : npx rimraf ./coverage/tmp
48+ - name : Upload
49+ uses : codecov/codecov-action@v1
50+ with :
51+ directory : ./coverage
Original file line number Diff line number Diff line change 99 "reporter" : [
1010 " html" ,
1111 " text" ,
12- " lcov "
12+ " cobertura "
1313 ],
1414 "lines" : 95 ,
1515 "branches" : " 93" ,
Original file line number Diff line number Diff line change 294294.PHONY : jstest
295295jstest : build-addons build-js-native-api-tests build-node-api-tests # # Runs addon tests and JS tests
296296 $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) \
297+ $(TEST_CI_ARGS ) \
297298 --skip-tests=$(CI_SKIP_TESTS ) \
298299 $(JS_SUITES ) \
299300 $(NATIVE_SUITES )
Original file line number Diff line number Diff line change 1+ comment :
2+ # Only show diff and files changed:
3+ layout : " diff, files"
4+ # Don't post if no changes in coverage:
5+ require_changes : true
6+
7+ codecov :
8+ notify :
9+ # Wait for all coverage builds:
10+ after_n_builds : 2
You can’t perform that action at this time.
0 commit comments