name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/checkout@v5
- name: Check formatting
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings
- name: markdownlint
uses: articulate/actions-markdownlint@v1
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v5
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
msrv:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.68.0
- uses: actions/checkout@v5
- name: Check compilation
run: cargo build --verbose
coverage:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v5
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Generate coverage report
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5