Skip to content

refactor: big

refactor: big #1

Workflow file for this run

name: Coverage
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: coverage-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1
RUSTFLAGS: "-Dwarnings"
DO_NOT_TRACK: 1
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Install Ubuntu dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler clang cmake
- uses: actions/checkout@v4
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-on-failure: true
shared-key: coverage-${{ github.head_ref || github.ref_name }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Generate code coverage
run: |
cargo llvm-cov nextest \
--locked \
--workspace \
--all-features \
--codecov \
--output-path codecov.json \
--no-fail-fast \
--nocapture \
--status-level all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true
- name: Clean up
if: always()
run: cargo llvm-cov clean --workspace --profraw-only