lints.yml 875 B

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