-
Notifications
You must be signed in to change notification settings - Fork 84
52 lines (42 loc) · 1.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
name: Coverage
on: [push, pull_request]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make
run: |
make EXTRA_CFLAGS="-coverage" CCACHE=
- uses: sreimers/[email protected]
with:
name: rem
repo: https://github.com/baresip/rem
secret: ${{ secrets.GITHUB_TOKEN }}
working-directory: '../.'
- uses: sreimers/[email protected]
with:
name: retest
repo: https://github.com/baresip/retest.git
secret: ${{ secrets.GITHUB_TOKEN }}
working-directory: '../.'
- name: retest
run: |
cd ..
rm re/libre.so || true
rm re/libre.dylib || true
make -C rem librem.a
cd retest; make EXTRA_LFLAGS="--coverage" && ./retest -a
- name: gcov
run: |
cd ../re
gcov build-x86_64/**/*.o
- name: install gcovr
run: |
pip install gcovr
- name: coverage check
run: |
min_cov="54.4"
cov=$(~/.local/bin/gcovr -r . -s | grep lines | awk '{ print $2 }' | sed 's/%//')
echo "Coverage: ${cov}% (min $min_cov%)"
exit $(echo "$cov < $min_cov" | bc -l)