-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (45 loc) · 1.34 KB
/
lcov.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
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
coverage:
name: Test Coverage
runs-on: ubuntu-latest
container:
image: vsaglib/vsag:ubuntu
steps:
- uses: actions/checkout@v4
- name: Link Python3.10 as Python
run: |
ln -s /usr/bin/python3 /usr/bin/python
- name: Install
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
apt-get update
apt install -y curl jq
- name: Load Cache
uses: actions/[email protected]
with:
path: ./build/
key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
- name: Compile
run: make cov
- name: Run Test
run: |
./scripts/test_parallel_bg.sh
./build/mockimpl/tests_mockimpl -d yes ${UT_FILTER} --allow-running-no-tests ${UT_SHARD}
- name: Collect Coverage Info
run: bash scripts/collect_cpp_coverage.sh
- name: Generate XML
run: lcov_cobertura coverage.info --output coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true