name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install stable --profile minimal --component rustfmt
rustup default stable
- name: Format
run: cargo fmt --all -- --check
- name: Check no default features
run: cargo check --locked --no-default-features --all-targets
- name: Test no default features
run: cargo test --locked --no-default-features
- name: Check all features
run: cargo check --locked --all-features --all-targets
- name: Enumerate all-feature tests
run: cargo test --locked --all-features -- --list
- name: Check examples
run: cargo check --locked --all-features --examples
- name: Build docs
run: cargo doc --locked --all-features --no-deps
- name: Package dry run
run: cargo package --locked