name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
name: fmt / clippy / test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: test
run: cargo test --all-features