Merge pull request #4 from katanemo/2-create-static-analysis-github-action

add checks on pr to ensure code compiles and passes static analysis checks.
This commit is contained in:
Aayush 2024-07-15 14:57:32 -07:00 committed by GitHub
commit 0370fac840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

27
.github/workflows/static-analysis.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Static Analysis
on: pull_request
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
run: rustup toolchain install stable --profile minimal
- name: Run Clippy
run: cd envoyfilter && cargo clippy --all-targets --all-features -- -Dwarnings
format:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
run: rustup toolchain install stable --profile minimal
- name: Run Rustfmt
run: cd envoyfilter && cargo fmt --all -- --check