Backport #266 to 0.4.latest
#697
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-commit Hooks | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
jobs: | |
pre-commit: | |
name: Run Pre-commit Hooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-python-env | |
# This step is necessary so long as we're allowing Pydantic 1 and Pydantic 2 via shimming | |
- name: Force Pydantic 1 | |
run: hatch run dev-env:pip install "pydantic~=1.10" | |
- name: Run Pre-commit Hooks | |
run: hatch run dev-env:pre-commit run --show-diff-on-failure --color=always --all-files |