lint.yml 715 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: lint
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. env:
  10. CARGO_TERM_COLOR: always
  11. jobs:
  12. lint:
  13. runs-on: ubuntu-20.04
  14. steps:
  15. - uses: actions/checkout@v2
  16. - uses: actions-rs/toolchain@v1
  17. with:
  18. profile: minimal
  19. toolchain: nightly
  20. components: rustfmt, clippy, rust-src
  21. override: true
  22. - name: Check formatting
  23. run: |
  24. cargo fmt --all -- --check
  25. pushd ebpf
  26. cargo fmt --all -- --check
  27. popd
  28. - name: Run clippy
  29. run: |
  30. cargo clippy -- --deny warnings
  31. pushd ebpf
  32. cargo clippy -- --deny warnings
  33. popd