mirror of
https://github.com/katanemo/plano.git
synced 2026-05-04 13:23:00 +02:00
add precommit check (#97)
* add precommit check
* remove check
* Revert "remove check"
This reverts commit 9987b62b9b.
* fix checks
* fix whitespace errors
This commit is contained in:
parent
1e61452310
commit
4182879717
26 changed files with 292 additions and 312 deletions
27
.github/workflows/checks.yml
vendored
27
.github/workflows/checks.yml
vendored
|
|
@ -3,33 +3,6 @@ name: Checks
|
|||
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 on arch
|
||||
run: cd arch && cargo clippy --all-targets --all-features -- -Dwarnings
|
||||
- name: Run Clippy on public_types
|
||||
run: cd public_types && 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 on arch
|
||||
run: cd arch && cargo fmt -p intelligent-prompt-gateway -- --check
|
||||
- name: Run Rustfmt on public_types
|
||||
run: cd public_types && cargo fmt -p public_types -- --check
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
14
.github/workflows/pre-commit.yml
vendored
Normal file
14
.github/workflows/pre-commit.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
Loading…
Add table
Add a link
Reference in a new issue