lints.yml 900 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. on:
  2. push:
  3. branches:
  4. - main
  5. workflow_dispatch:
  6. pull_request:
  7. name: Lints
  8. jobs:
  9. rustfmt:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Install stable toolchain
  14. uses: actions-rs/toolchain@v1
  15. with:
  16. profile: minimal
  17. toolchain: stable
  18. override: true
  19. components: rustfmt
  20. - name: Run cargo fmt
  21. uses: actions-rs/cargo@v1
  22. with:
  23. command: fmt
  24. args: --all -- --check
  25. clippy_check:
  26. name: Clippy check
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v2
  30. - name: Install stable toolchain
  31. uses: actions-rs/toolchain@v1
  32. with:
  33. toolchain: stable
  34. components: clippy
  35. override: true
  36. - uses: actions-rs/clippy-check@v1
  37. with:
  38. token: ${{ secrets.GITHUB_TOKEN }}