Skip to content

Increase coverage

Increase coverage #27

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
# Ensure we don't need a real DB for basic unit tests
DATABASE_URL: postgres://user:password@localhost/dummy
jobs:
build_and_test:
name: Test & Doc Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Rust
run: |
rustup override set nightly
rustup component add rustfmt
rustup component add clippy
- name: Check Formatting
run: cargo fmt -- --check
- name: Clippy (Linting)
run: cargo clippy --workspace -- -D warnings
- name: Build Workspace
run: cargo build --verbose --workspace
- name: Run Tests
run: cargo test --verbose --workspace
- name: Check Documentation
# This compiles the docs and respects #![deny(missing_docs)]
run: cargo doc --workspace --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-D warnings"
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run Test Coverage
# Enforces 100% test coverage across the workspace
run: cargo tarpaulin --fail-under 100 --workspace --out xml