Skip to content

Commit bcb01c8

Browse files
committed
build: add GitHub Action for coverage with --without-intl
There are parts of the code base that require a build without intl to be covered. So add a coverage job to build --without-intl.
1 parent 65c9cb1 commit bcb01c8

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: coverage-linux-without-intl
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-linux-without-intl:
25+
if: github.event.pull_request.draft == false
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Set up Python ${{ env.PYTHON_VERSION }}
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ env.PYTHON_VERSION }}
33+
- name: Environment Information
34+
run: npx envinfo
35+
- name: Install gcovr
36+
run: pip install gcovr==4.2
37+
- name: Build
38+
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --without-intl --coverage"
39+
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
40+
# The cause is most likely coverage's use of the inspector.
41+
- name: Test
42+
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0
43+
- name: Report JS
44+
run: npx c8 report --check-coverage
45+
- name: Report C++
46+
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)
47+
# Clean temporary output from gcov and c8, so that it's not uploaded:
48+
- name: Clean tmp
49+
run: rm -rf coverage/tmp && rm -rf out
50+
- name: Upload
51+
uses: codecov/codecov-action@v1
52+
with:
53+
directory: ./coverage

0 commit comments

Comments
 (0)