Skip to content

Commit

Permalink
enable codecov in GH check
Browse files Browse the repository at this point in the history
Change-Id: I2ee14831a7562c5735f20ccedd13fb2e887cbcdc
  • Loading branch information
garymm committed Sep 10, 2023
1 parent 660c528 commit 4e5a324
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@ jobs:
--features=${{ matrix.feature }} \
//...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: mount bazel cache
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel-coverage

- name: install libtinfo5
# clang tools load libtinfo5 for color diagnostics but `ubuntu-latest`
# runners already have `libtinfo.so.6` installed. We just create a
# symlink since it's faster than installing libtinfo5.
# https://github.com/circleci/circleci-images/issues/430#issuecomment-522602495
run: |
sudo ln -s /lib/x86_64-linux-gnu/libtinfo.so.6 /lib/x86_64-linux-gnu/libtinfo.so.5
- run: |
bazel \
--bazelrc=.github/workflows/ci.bazelrc \
coverage \
//...
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./bazel-out/_coverage/_coverage_report.dat
fail_ci_if_error: true

build:
runs-on: ubuntu-latest
strategy:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ build --remote_download_minimal

test --test_output=all
test --test_verbose_timeout_warnings

coverage --combined_report=lcov
coverage --strategy=CoverageReport=local
coverage --experimental_split_coverage_postprocessing
coverage --experimental_fetch_all_coverage_outputs
coverage --remote_download_outputs=all
coverage --experimental_remote_download_regex=.*/((testlogs/.*/_coverage/.*)|coverage.dat$|_coverage/_coverage_report.dat$)
coverage --extra_toolchains=//toolchain:gcc
coverage --instrumentation_filter='//.*'

0 comments on commit 4e5a324

Please sign in to comment.