Skip to content

Commit

Permalink
ci: Add coverage run to the CI and attempt to upload to Codecov.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Feb 8, 2024
1 parent c33d143 commit b38e92b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,22 @@ jobs:
- name: install dependencies
run: |
sudo apt-get install -y \
dejagnu
- run: bazel test --test_output=errors //...
dejagnu \
gcc \
llvm
dpkg -S llvm-cov
- name: bazel test
run: bazel coverage --explain=explain.out -s --test_env=VERBOSE_COVERAGE=1 --test_env=DISPLAY_LCOV_CMD=1 --test_output=all --combined_report=lcov --instrument_test_targets --nocache_test_results --instrumentation_filter="^//" //...
- name: copy test results into workspace
if: always()
run: cp -Lpr $(bazel info bazel-testlogs)/ test-results
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
- run: cat explain.out
if: always()
- uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/**/test.xml
- uses: codecov/codecov-action@v4
with:
file: bazel-out/_coverage/_coverage_report.dat
2 changes: 2 additions & 0 deletions testsuite/dejagnu.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ if ! [ -x /bin/runtest ]; then
exit 127
fi
/bin/runtest --version
cleanup () {{
mv $TEST_UNDECLARED_OUTPUTS_DIR/{tool}.xml $XML_OUTPUT_FILE
}}
Expand Down

0 comments on commit b38e92b

Please sign in to comment.