| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- name: Checks
- on:
- workflow_dispatch:
- workflow_call:
- jobs:
- checks:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Setup Rust
- uses: MatteoH2O1999/setup-rust@v1
- - name: Cache Rust dependencies
- uses: Swatinem/rust-cache@v2
- - name: Check code formatting
- run: |
- rustup component add rustfmt
- cargo fmt --all -- --check
- - name: Check project
- run: cargo check --all-targets
- - name: Clippy project
- run: |
- rustup component add clippy
- cargo clippy --all-targets -- -D warnings
- - name: Test project
- run: cargo test --all-targets
- # - name: Install cargo-audit
- # run: cargo install cargo-audit
- # - name: Audit dependencies for vulnerabilities
- # run: cargo audit
- # - name: Install cargo-deny
- # run: cargo install cargo-deny
- # - name: Check bans, licenses, and advisories with cargo-deny
- # run: cargo deny check
- - name: Check documentation
- run: cargo doc --no-deps --document-private-items
- env:
- RUSTDOCFLAGS: -D warnings
|