|
@@ -0,0 +1,41 @@
|
|
|
+name: lint
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches:
|
|
|
+ - main
|
|
|
+
|
|
|
+ pull_request:
|
|
|
+ branches:
|
|
|
+ - main
|
|
|
+
|
|
|
+env:
|
|
|
+ CARGO_TERM_COLOR: always
|
|
|
+
|
|
|
+jobs:
|
|
|
+ lint:
|
|
|
+ runs-on: ubuntu-20.04
|
|
|
+
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+
|
|
|
+ - uses: actions-rs/toolchain@v1
|
|
|
+ with:
|
|
|
+ profile: minimal
|
|
|
+ toolchain: nightly
|
|
|
+ components: rustfmt, clippy, rust-src
|
|
|
+ override: true
|
|
|
+
|
|
|
+ - name: Check formatting
|
|
|
+ run: |
|
|
|
+ cargo fmt --all -- --check
|
|
|
+ pushd ebpf
|
|
|
+ cargo fmt --all -- --check
|
|
|
+ popd
|
|
|
+
|
|
|
+ - name: Run clippy
|
|
|
+ run: |
|
|
|
+ cargo clippy -- --deny warnings
|
|
|
+ pushd ebpf
|
|
|
+ cargo clippy -- --deny warnings
|
|
|
+ popd
|