-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: seperate between pre-commit and pre-push
- Loading branch information
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 5 additions & 2 deletions
7
.github/workflows/pre-commit.yaml → .github/workflows/static-analysis.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths-ignore: ['**/Dockerfile', '**/public/**', '**/.*ignore', '**/*.toml'] | ||
push: | ||
branches: [main, staging] | ||
paths-ignore: ['**/Dockerfile', '**/public/**', '**/.*ignore', '**/*.toml'] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install Rust toolchain 1.74 (with clippy and rustfmt) | ||
run: rustup toolchain install nightly-2023-12-21 && rustup component add clippy --toolchain nightly-2023-12-21 && rustup component add rustfmt --toolchain nightly-2023-12-21 | ||
|
||
- name: Run pre-push hooks | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage pre-push | ||
|