2023-04-25 05:30:31 -07:00
|
|
|
name: Coverage
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
path:
|
|
|
|
- '**/*.rs'
|
|
|
|
- '**/*.txt'
|
|
|
|
- '**/Cargo.toml'
|
|
|
|
- '**/Cargo.lock'
|
|
|
|
- 'codecov.yml'
|
|
|
|
- '.github/workflows/coverage.yml'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
coverage:
|
|
|
|
name: Coverage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: full
|
|
|
|
|
|
|
|
steps:
|
2024-11-19 13:00:19 -08:00
|
|
|
- uses: actions/checkout@v4.2.2
|
2023-04-25 05:30:31 -07:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
2024-02-09 09:29:26 -08:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-04-25 05:30:31 -07:00
|
|
|
with:
|
|
|
|
components: llvm-tools-preview
|
|
|
|
|
|
|
|
- name: Install cargo-llvm-cov cargo command
|
|
|
|
run: cargo install cargo-llvm-cov
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs'
|
|
|
|
|
|
|
|
- name: Generate coverage report
|
|
|
|
run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs' --output-path lcov.info
|
|
|
|
|
|
|
|
- name: Upload coverage report to Codecov
|
2024-12-26 14:05:24 -08:00
|
|
|
uses: codecov/codecov-action@v5.1.2
|