| 1 |
name: pre-commit |
| 2 |
on: |
| 3 |
pull_request: |
| 4 |
push: |
| 5 |
branches: [main, stable] |
| 6 |
permissions: {} |
| 7 |
concurrency: |
| 8 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 9 |
cancel-in-progress: true |
| 10 |
jobs: |
| 11 |
main: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 15 |
with: |
| 16 |
persist-credentials: false |
| 17 |
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 |
| 18 |
with: |
| 19 |
enable-cache: true |
| 20 |
prune-cache: false |
| 21 |
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| 22 |
id: setup-python |
| 23 |
with: |
| 24 |
python-version-file: pyproject.toml |
| 25 |
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| 26 |
with: |
| 27 |
path: ~/.cache/pre-commit |
| 28 |
key: pre-commit|${{ hashFiles('pyproject.toml', '.pre-commit-config.yaml') }} |
| 29 |
- run: uv run --locked --no-default-groups --group pre-commit pre-commit run --show-diff-on-failure --color=always --all-files |