πβ¨ Add pre-commit CI pipeline #10
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 | |
on: | |
push: | |
tags: | |
- v** | |
branches-ignore: | |
- "dependabot/**" | |
- "sourcery/**" | |
- "pre-commit-ci-update-config" | |
pull_request: | |
jobs: | |
pre-commit: | |
name: π§Ή Pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬ Check out repo | |
uses: actions/checkout@v4 | |
- name: π Set up uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: ".pre-commit-config.yaml" | |
cache-local-path: /tmp/uv-pa-cache | |
cache-suffix: uv-pre-commit | |
- name: π§°πββοΈ Run pre-commit | |
env: | |
PRE_COMMIT_HOME: /tmp/uv-pa-cache/pa-envs | |
run: | | |
uvx -p 3.13 --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always -a |