Skip to content

Commit

Permalink
ci: Capture coverage information even when tests fail
Browse files Browse the repository at this point in the history
Ensure that code coverage information is calculated and stored
even when tests fail.

Signed-off-by: Sam Friedman <[email protected]>
  • Loading branch information
sam-golioth committed Jan 15, 2025
1 parent c2ac22d commit c0ddbc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/hil-integration-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ jobs:
--alluredir=allure-reports \
--platform linux
- name: Capture coverage
if: success() || failure()
run: |
gcovr \
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file \
--merge-mode-functions=separate \
Expand All @@ -112,6 +115,7 @@ jobs:
- name: Upload coverage
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: linux-hil-test-coverage-${{ matrix.test }}
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hil-integration-nsim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
--allure-board=${{ inputs.platform }}
- name: Capture coverage
if: success() || failure()
run: |
gcovr -r modules/lib/golioth-firmware-sdk \
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file \
Expand All @@ -143,7 +144,7 @@ jobs:
hil-out/${{ matrix.test }}
- name: Upload test coverage artifacts
if: always()
if: success() || failure()
uses: ./modules/lib/golioth-firmware-sdk/.github/actions/safe-upload-artifacts
with:
secrets-json: ${{ toJson(secrets) }}
Expand Down

0 comments on commit c0ddbc5

Please sign in to comment.