Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pre-Commit

on:
pull_request:
branches:
- main
- dev
types:
- opened
- synchronize
- reopened

jobs:
pre-commit:
name: Run pre-commit checks
runs-on: ubuntu-24.04
steps:
Comment on lines +14 to +17
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Comment on lines +18 to +22
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.10"
- name: Cache pip
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt', 'requirements/requirements.async.txt', 'requirements/requirements.build.txt', 'requirements/requirements.crypto.txt', 'requirements/requirements.dev.txt', 'requirements/requirements.docs.txt', 'requirements/requirements.fastapi.txt', 'requirements/requirements.test.txt') }}
- name: Install pre-commit and dependencies
run: |
python -m pip install -U pip
python -m pip install ".[dev]"
- name: Cache pre-commit
uses: actions/cache@v6
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always
17 changes: 0 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,6 @@ repos:
entry: "python -m pyright"
files: \.pyi?$

# --- Tests ---
# - repo: local
# hooks:
# - id: pytest-collect
# name: "🧪 pytest-collect (local) - Validate test formatting"
# language: system
# entry: "python -m pytest --collect-only"
# pass_filenames: false
# always_run: true

# - id: pytest
# name: "🧪 pytest (local) - Run tests"
# language: system
# entry: "./scripts/test.sh -l -v -c"
# pass_filenames: false
# always_run: true

# --- Cleanup ---
# - repo: local
# hooks:
Expand Down