diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/checks.yml similarity index 59% rename from .github/workflows/static-analysis.yml rename to .github/workflows/checks.yml index 61be55e2..77b71f48 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,4 @@ -name: Static Analysis +name: Checks on: pull_request @@ -25,3 +25,16 @@ jobs: run: rustup toolchain install stable --profile minimal - name: Run Rustfmt run: cd envoyfilter && cargo fmt --all -- --check + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Setup | Checkout + uses: actions/checkout@v4 + - name: Setup | Rust + run: rustup toolchain install stable --profile minimal + - name: Run Tests + # --lib is to only test the library, since when integration tests are made, + # they will be in a seperate tests directory + run: cd envoyfilter && cargo test --lib diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb5b0a78..38c9d3f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,4 +21,6 @@ repos: name: cargo-test language: system types: [file, rust] - entry: bash -c "cd envoyfilter && cargo test --all" + # --lib is to only test the library, since when integration tests are made, + # they will be in a seperate tests directory + entry: bash -c "cd envoyfilter && cargo test --lib"