forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.65 KB
/
coverage-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: coverage-linux
on:
pull_request:
push:
branches:
- master
env:
PYTHON_VERSION: 3.9
FLAKY_TESTS: dontcare
jobs:
coverage-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Clone gcovr reporter
run: git clone -b 3.4 --depth=1 --single-branch https://github.com/gcovr/gcovr.git
- name: Clone patch for gcovr
run: git clone --depth=1 --single-branch https://github.com/nodejs/build.git
- name: Patch gcovr
run: cd gcovr && patch -N -p1 < ../build/jenkins/scripts/coverage/gcovr-patches-3.4.diff
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
run: NODE_V8_COVERAGE=coverage/tmp make run-ci -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0
- name: Report js
run: npx c8 report --check-coverage
- name: Report C++
run: cd out && ../gcovr/scripts/gcovr --gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage.xml --gcov-executable=gcov
- name: Output file count
run: ls -l coverage/tmp/ | wc -l
- name: Clean tmp
run: rm -rf coverage/tmp
- name: Upload
uses: codecov/codecov-action@v1
with:
directory: ./coverage