Skip to content

Commit

Permalink
change code coverage from grcov to cargo-llvm-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed Jul 16, 2023
1 parent 0e251e6 commit 3dc4755
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 103 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: codecov
on:
push:
branches: [main, 0.4.x]
pull_request:
jobs:
# Run code coverage using cargo-llvm-cov then upload to codecov.io
job_code_coverage:
name: llvm-cov
runs-on: ubuntu-latest
env:
# `MSRV` should match project `cargo-llvm-cov` value for `rust-version`
MSRV: 1.64
# set version outside of `Cargo.toml` to avoid `cargo-llvm-cov` dev-dependency
LLVM_COV_VERSION: 0.5.23
COVERAGE_FILE: ./coverage.lcov
steps:
- name: git checkout
uses: actions/checkout@v3
- name: toolchain ${{ env.MSRV }} minimal
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.MSRV }}
override: true
- name: install cargo-llvm-cov
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-llvm-cov --version ${{ env.LLVM_COV_VERSION }}
- name: add llvm-tools-preview
shell: bash
run: rustup component add llvm-tools-preview
- name: run llvm-cov
shell: bash
run: |
set -eux
cargo llvm-cov --version
cargo llvm-cov show-env
cargo llvm-cov --lcov --output-path "${COVERAGE_FILE}"
- name: upload to codecov.io
uses: codecov/codecov-action@v3
with:
files: ${{ env.COVERAGE_FILE }}
verbose: true
fail_ci_if_error: true
103 changes: 0 additions & 103 deletions .github/workflows/grcov.yml

This file was deleted.

0 comments on commit 3dc4755

Please sign in to comment.