Skip to content

Coverage

Coverage #12

Workflow file for this run

name: Coverage
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
toolchain: stable
- name: Install llvm-cov
run: cargo install cargo-llvm-cov
# TODO: exclude functions (e.g. down() in migrations)
- name: Generate coverage report
run: cargo llvm-cov --lcov --output-path coverage.lcov
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: coverage.lcov
flags: rust
token: ${{ secrets.CODECOV_TOKEN }}