diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..c7aeb567 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,2 @@ +coverage: + range: 50..95 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..1ad92515 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -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 diff --git a/.grcov.yml b/.grcov.yml new file mode 100644 index 00000000..781860c7 --- /dev/null +++ b/.grcov.yml @@ -0,0 +1,5 @@ +branch: true +ignore-not-existing: true +filter: covered +output-type: lcov +output-file: lcov.info \ No newline at end of file