checks.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Checks
  2. on:
  3. workflow_dispatch:
  4. workflow_call:
  5. jobs:
  6. checks:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Checkout
  10. uses: actions/checkout@v4
  11. - name: Setup Rust
  12. uses: MatteoH2O1999/setup-rust@v1
  13. - name: Cache Rust dependencies
  14. uses: Swatinem/rust-cache@v2
  15. - name: Check code formatting
  16. run: |
  17. rustup component add rustfmt
  18. cargo fmt --all -- --check
  19. - name: Check project
  20. run: cargo check --all-targets
  21. - name: Clippy project
  22. run: |
  23. rustup component add clippy
  24. cargo clippy --all-targets -- -D warnings
  25. - name: Test project
  26. run: cargo test --all-targets
  27. # - name: Install cargo-audit
  28. # run: cargo install cargo-audit
  29. # - name: Audit dependencies for vulnerabilities
  30. # run: cargo audit
  31. # - name: Install cargo-deny
  32. # run: cargo install cargo-deny
  33. # - name: Check bans, licenses, and advisories with cargo-deny
  34. # run: cargo deny check
  35. - name: Check documentation
  36. run: cargo doc --no-deps --document-private-items
  37. env:
  38. RUSTDOCFLAGS: -D warnings