@@ -16,66 +16,34 @@ jobs:
1616 runs-on : ubuntu-latest
1717
1818 steps :
19- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2020 with :
2121 persist-credentials : false
22- - uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
22+ - uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
2323 with :
24- path : |
25- ~/.cache/prek
26- ~/.cache/kingfisher
24+ path : ~/.cache/prek
2725 key : ${{ runner.os }}-${{ runner.arch }}-prek-${{ hashFiles('.pre-commit-config.yaml') }}
2826 restore-keys : |
2927 ${{ runner.os }}-${{ runner.arch }}-prek-
3028 - name : Setup Python
31- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
29+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3230 with :
3331 python-version : ' 3.14'
34- - uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
32+ - uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
3533 with :
3634 version : 0.11.12
37- - name : detect method
38- id : detect
39- run : |
40- if test -f requirements-lint.txt ; then
41- echo "method=requirements" >> "$GITHUB_OUTPUT"
42- elif test -f pyproject.toml && grep -q dependency-groups pyproject.toml ; then
43- echo "method=pep735" >> "$GITHUB_OUTPUT"
44- else
45- echo "method=uvx" >> "$GITHUB_OUTPUT"
46- fi
47- - name : pre-commit (PEP 735)
48- if : steps.detect.outputs.method == 'pep735'
35+ - name : pre-commit
4936 run : |
5037 uv run --only-group pre-commit prek run --all-files --show-diff-on-failure
5138 uv run --only-group pre-commit prek cache gc
5239 env :
5340 RUFF_OUTPUT_FORMAT : github
5441 REUSE_OUTPUT_FORMAT : github
5542 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56- - name : pre-commit (uvx)
57- if : steps.detect.outputs.method == 'uvx'
58- run : |
59- uvx prek run --all-files --show-diff-on-failure
60- uvx prek cache gc
61- env :
62- RUFF_OUTPUT_FORMAT : github
63- REUSE_OUTPUT_FORMAT : github
64- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65- - name : pre-commit (requirements)
66- if : steps.detect.outputs.method == 'requirements'
67- run : |
68- uv pip install --system -r requirements-lint.txt
69- prek run --all-files --show-diff-on-failure
70- prek cache gc
71- env :
72- RUFF_OUTPUT_FORMAT : github
73- REUSE_OUTPUT_FORMAT : github
74- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7543 - name : diff
7644 run : git diff
7745 if : always()
78- - uses : pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
46+ - uses : pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43
7947 if : always()
8048 with :
8149 msg : ' chore(pre-commit): apply code formatting'
0 commit comments