Skip to content

Commit

Permalink
try pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Apr 28, 2024
1 parent ab1cfff commit df96c72
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pre-commit

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
pre-commit:
name: "pre-commit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v4
- name: pre-commit (cache)
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit (--all-files)
run: |
python -m pip install pre-commit
pre-commit run --show-diff-on-failure --color=always --all-files
5 changes: 4 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: verify

on:
push:
branches:
Expand All @@ -6,7 +8,8 @@ on:
branches:
- main

name: Verify
permissions:
contents: read

jobs:
verify:
Expand Down

0 comments on commit df96c72

Please sign in to comment.