From f5e221a9765e6c3216ba38340e8dba880a2235af Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 10 May 2023 09:44:45 +0200 Subject: [PATCH] Add coverage CI Temporarily disabled until setup internally Signed-off-by: Cristian Le --- .github/workflows/test.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f67f74c..91bcb36 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -49,3 +49,27 @@ jobs: uses: lukka/run-cmake@v10.5 with: workflowPreset: "${{ matrix.toolchain }}-ci" + coverage: + name: Run coverage tests + needs: [ test ] + runs-on: ubuntu-latest + container: ghcr.io/nlohmann/json-ci:v2.4.0 + # TODO: Temporarily disabled because not implemented + if: ${{ false && (github.event_name == 'push' || github.event_name == 'pull_request') }} + steps: + - uses: actions/checkout@v3 + - name: Get test coverage + uses: lukka/run-cmake@v10.5 + with: + workflowPreset: ci-coverage + - name: Get lcov data + uses: danielealbano/lcov-action@v3 + with: + # Note lcov-action prepends and appends wild-cards *. Account for those + # https://github.com/danielealbano/lcov-action/issues/11 + remove_patterns: /test/,/cmake-build*/ + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: coverage.info + verbose: true