name: Rust on: push: branches: - master - main pull_request: branches: - master - main jobs: test: name: Test runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@1.85 with: components: rustfmt, clippy - name: Cache uses: Swatinem/rust-cache@v2 - name: Format run: cargo fmt --all -- --check - name: Check run: cargo check --all-targets --all-features - name: Clippy run: cargo clippy --all-targets --all-features -- -D warnings - name: Test run: cargo test --all-features - name: Documentation env: RUSTDOCFLAGS: "-D warnings" run: cargo doc --no-deps --all-features - name: Package run: cargo package --allow-dirty