Add pre-commit workflow for checks and hooks

This commit is contained in:
Jacob Kraniak 2026-05-19 21:51:22 -04:00 committed by GitHub
parent 0c252decfe
commit 32f46f20cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 33 additions and 0 deletions

33
.github/workflows/pre-commit.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Pre-commit Checks
on:
push:
branches: [ "JK_Revisions" ]
pull_request:
branches: [ "JK_Revisions" ]
schedule:
- cron: "0 8 * * 1" # Weekly on Mondays at 08:00 UTC
workflow_dispatch: # Allows manual trigger from Actions tab
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit hooks
run: pre-commit run --all-files --show-diff-on-failure