Skip to content

Commit 4b106cb

Browse files
committed
ci: add code coverage
From https://mesonbuild.com/howtox.html#producing-a-coverage-report Upload a report to https://codecov.io/ Signed-off-by: Boris Glimcher <[email protected]>
1 parent b33603c commit 4b106cb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/meson.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,23 @@ jobs:
4747
with:
4848
name: Linux_Meson_log
4949
path: build/meson-logs/meson-log.txt
50+
51+
code-coverage:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: install libraries
55+
run: sudo apt-get install libjson-c-dev lcov
56+
- uses: actions/checkout@v2
57+
- uses: actions/setup-python@v1
58+
- uses: BSFishy/[email protected]
59+
with:
60+
setup-options: -Db_coverage=true --werror
61+
options: --verbose
62+
# Can't use 'coverage' here, see https://github.com/BSFishy/meson-build/issues/4
63+
action: test
64+
- name: Generate Coverage Report
65+
# Can't use meson here, see https://github.com/mesonbuild/meson/issues/7895
66+
run: ninja -C build coverage --verbose
67+
- uses: codecov/codecov-action@v1
68+
with:
69+
fail_ci_if_error: false

0 commit comments

Comments
 (0)