lint.yml 714 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: lint
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - ci
  7. pull_request:
  8. branches:
  9. - main
  10. env:
  11. CARGO_TERM_COLOR: always
  12. jobs:
  13. lint:
  14. runs-on: ubuntu-20.04
  15. steps:
  16. - uses: actions/checkout@v3
  17. - uses: dtolnay/rust-toolchain@master
  18. with:
  19. toolchain: nightly
  20. components: rustfmt, clippy, miri, rust-src
  21. - uses: Swatinem/rust-cache@v2
  22. - name: Check formatting
  23. run: cargo fmt --all -- --check
  24. - uses: taiki-e/install-action@cargo-hack
  25. - name: Run clippy
  26. run: cargo hack clippy --all-targets --feature-powerset --workspace -- --deny warnings
  27. - name: Run miri
  28. run: cargo miri test --all-targets