-
Notifications
You must be signed in to change notification settings - Fork 322
90 lines (80 loc) · 2 KB
/
coverage.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# The coverage jobs for cpp code
#
# This sperate job exists because C/CPP coverage require build type to be Debug.
# Other coverage jobs e.g java/scala's coverage lives alongside with their test jobs.
name: coverage
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'demo/**'
- 'docker/**'
- 'image/**'
- 'release/**'
- 'tools/**'
- '*.md'
- 'benchmark/**'
pull_request:
paths-ignore:
- 'docs/**'
- 'demo/**'
- 'docker/**'
- 'image/**'
- 'release/**'
- 'tools/**'
- '*.md'
- 'benchmark/**'
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-20.04
env:
CTEST_PARALLEL_LEVEL: 1 # parallel test level for ctest (make test)
CMAKE_BUILD_TYPE: Debug
TESTING_ENABLE: ON
SQL_PYSDK_ENABLE: OFF
SQL_JAVASDK_ENABLE: OFF
NPROC: 2
BUILD_SHARED_LIBS: ON
TESTING_ENABLE_STRIP: ON
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: download lcov
uses: actions/checkout@v3
with:
repository: linux-test-project/lcov
ref: v1.16
path: lcov
- name: install lcov
working-directory: lcov
run: |
sudo make install
- name: coverage configure
run: |
make coverage-configure
- name: start service
run: |
./steps/ut_zookeeper.sh start
# make coverage-cpp will gen 16G build/ (no run), run test will take 2G more, so split make and test
- name: Coverage CPP
run: |
make coverage-cpp
- name: debug
if: always()
run: |
du -d 1 -h build
df -h
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: build/coverage.info
name: coverage-cpp
fail_ci_if_error: true
verbose: true
- name: stop service
run: |
./steps/ut_zookeeper.sh stop