* NEW [workflow] add coverage.yml

This commit is contained in:
alvin1221 2022-12-09 15:32:08 +08:00 committed by Jaylin
parent 6b79a681e9
commit f724632f10
3 changed files with 42 additions and 0 deletions

2
.codecov.yml Normal file
View File

@ -0,0 +1,2 @@
coverage:
range: 50..95

35
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: coverage
on: [push]
jobs:
linux-coverage:
name: linux
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install mbedTLS
run: sudo apt-get install libmbedtls-dev
- name: Install ninja
run: sudo apt-get install ninja-build
- name: Configure
run: mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DNNG_ENABLE_COVERAGE=ON -DNNG_ENABLE_TLS=ON -DNNG_ENABLE_SQLITE=ON ..
- name: build
run: cd build && ninja && sudo ninja install
- name: Test
run: |
python3 .github/scripts/test.py
# run: cd build && ctest --output-on-failure
- name: Upload report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
yml: ./.codecov.yml

5
.grcov.yml Normal file
View File

@ -0,0 +1,5 @@
branch: true
ignore-not-existing: true
filter: covered
output-type: lcov
output-file: lcov.info