Skip to content

Commit

Permalink
fix: seperate between pre-commit and pre-push
Browse files Browse the repository at this point in the history
  • Loading branch information
0xisk committed Mar 19, 2024
1 parent 8eeae50 commit ce9dfdb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Pre-commit Static Analysis
name: Static Analysis

on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore: ['**/Dockerfile', '**/public/**', '**/.*ignore', '**/*.toml']
push:
branches: [main]
branches: [main, staging]
paths-ignore: ['**/Dockerfile', '**/public/**', '**/.*ignore', '**/*.toml']

jobs:
pre-commit:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
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

0 comments on commit ce9dfdb

Please sign in to comment.