name: Main
on: [push]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Run test coverage
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
with:
toolchain: nightly
components: llvm-tools-preview
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Run test coverage
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov --lcov --output-path ./coverage.lcov
- name: Upload results to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
with:
file: ./coverage.lcov