Skip to content

Commit f6a1e5a

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 75d0d0a commit f6a1e5a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: coverage-linux-without-intl
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
paths-ignore:
7+
- '**.md'
8+
- 'benchmark/**'
9+
- 'deps/**'
10+
- 'doc/**'
11+
- .github/**
12+
- '!.github/workflows/coverage-linux-without-intl.yml'
13+
push:
14+
branches:
15+
- master
16+
- main
17+
paths-ignore:
18+
- '**.md'
19+
- 'benchmark/**'
20+
- 'deps/**'
21+
- 'doc/**'
22+
- .github/**
23+
- '!.github/workflows/coverage-linux-without-intl.yml'
24+
25+
env:
26+
PYTHON_VERSION: 3.9
27+
FLAKY_TESTS: dontcare
28+
29+
jobs:
30+
coverage-linux-without-intl:
31+
if: github.event.pull_request.draft == false
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Set up Python ${{ env.PYTHON_VERSION }}
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: ${{ env.PYTHON_VERSION }}
39+
- name: Environment Information
40+
run: npx envinfo
41+
- name: Install gcovr
42+
run: pip install gcovr==4.2
43+
- name: Build
44+
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --without-intl --coverage"
45+
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
46+
# The cause is most likely coverage's use of the inspector.
47+
- name: Test
48+
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0
49+
- name: Report JS
50+
run: npx c8 report --check-coverage
51+
- name: Report C++
52+
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)
53+
# Clean temporary output from gcov and c8, so that it's not uploaded:
54+
- name: Clean tmp
55+
run: rm -rf coverage/tmp && rm -rf out
56+
- name: Upload
57+
uses: codecov/codecov-action@v1
58+
with:
59+
directory: ./coverage

0 commit comments

Comments
 (0)