Skip to content

ci: Split lints into more jobs #745

ci: Split lints into more jobs

ci: Split lints into more jobs #745

Workflow file for this run

name: "Test Coverage"
on:
push:
branches:
- main
paths:
- ".github/**/*"
- ".codecov.yml"
- "**.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
branches:
- main
paths:
- ".github/**/*"
- ".codecov.yml"
- "**.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
jobs:
coverage:
name: on ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
targets: x86_64-unknown-linux-gnu
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-coverage-
cargo-
- name: Install cargo-llvm-cov and nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,nextest
- name: Generate code coverage
env:
NEXTEST_PROFILE: coverage # defined in .config/nextest.toml
run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}