Skip to content

Commit

Permalink
Install pre-commit as a github action
Browse files Browse the repository at this point in the history
  • Loading branch information
corrylc committed Apr 22, 2024
1 parent bf19d99 commit d499d62
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: pre-commit/[email protected]
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Enable ruff and mypy for code paths that have been updated for full mypy compliance (opt-in)
files: |
(?x)^(
global_helpers/panther_base_helpers.*
)$
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
rev: v0.4.1
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]

- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
Expand Down

0 comments on commit d499d62

Please sign in to comment.