name: CPP Coverage | |
on: | |
push: | |
branches: | |
- master | |
# mainly refer to: https://github.com/merkrafter/Merkompiler/blob/development/.github/workflows/quality_assurance.yml | |
jobs: | |
calculate-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate coverage report | |
working-directory: ./cpp | |
run: bazel coverage //... | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./cpp/bazel-out/_coverage/_coverage_report.dat | |
flags: cpp | |
fail_ci_if_error: true | |
verbose: true |