name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '14 3 1 * *'
env:
CARGO_TERM_COLOR: always
jobs:
build-test-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
run: rustup update stable && rustup default stable
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check linting
run: cargo clippy -- -D warnings
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run coverage
uses: taiki-e/install-action@cargo-llvm-cov
- name: Check documentation
run: cargo doc --no-deps --all-features --verbose
- name: Check README is up to date
run: |
cargo install cargo-rdme
cargo rdme --check