feat: readme #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://json-schema.org/draft-07/schema# | |
name: Test Coverage | |
on: | |
push: | |
pull_request: | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-latest | |
env: | |
GCC_VERSION: 12 | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v3 | |
- name: Setup bazel | |
uses: jwlawson/actions-setup-bazel@v1 | |
with: | |
bazel-version: "latest" | |
- name: Setup GCC | |
uses: Dup4/actions-setup-gcc@v1 | |
with: | |
version: ${{ env.GCC_VERSION }} | |
- name: Install lcov | |
run: | | |
sudo apt install lcov | |
- name: Coverage | |
run: | | |
make bazel_coverage | |
make bazel_coverage_genhtml | |
cp ./bazel-testlogs/unittest/coverage.dat coverage.dat | |
- name: upload coverage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: | | |
bazel-coverage-html | |
coverage.dat | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: coverage.dat | |
verbose: true |