Skip to content

Commit

Permalink
Enable post commit run of pre-commit hooks over all files. (#3245)
Browse files Browse the repository at this point in the history
The pre-commit hook will only run on changed files, whereas this runs on
push and will check everything.
  • Loading branch information
stellaraccident authored Apr 27, 2024
1 parent 6877302 commit a339d7b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/pre-commit-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: pre-commit (all files on push)

on:
push:
branches: [main, post-commit-test]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
with:
extra_args: --color=always --all-files
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "GeneratedTorchOps\\.td|abstract_interp_lib_gen\\.py|\\.excalidraw"
exclude: "GeneratedTorchOps\\.td|abstract_interp_lib_gen\\.py|\\.excalidraw|\\.ipynb"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
Expand Down

0 comments on commit a339d7b

Please sign in to comment.