plano/.pre-commit-config.yaml
Aayush 31c4ac267a
Add testing to GitHub workflow (#15)
* update workflow and pre-commit to test only unit tests

* Update .github/workflows/checks.yml

Co-authored-by: Adil Hafeez <adil@katanemo.com>

* Update .pre-commit-config.yaml

Co-authored-by: Adil Hafeez <adil@katanemo.com>

* update formatting of comments

* Update .pre-commit-config.yaml

* Update checks.yml

---------

Co-authored-by: Adil Hafeez <adil@katanemo.com>
2024-07-18 14:20:33 -07:00

26 lines
827 B
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: cargo-fmt
name: cargo-fmt
language: system
types: [file, rust]
entry: bash -c "cd envoyfilter && cargo fmt --all"
- id: cargo-clippy
name: cargo-clippy
language: system
types: [file, rust]
entry: bash -c "cd envoyfilter && cargo clippy --all"
- id: cargo-test
name: cargo-test
language: system
types: [file, rust]
# --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"