File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,30 @@ jobs:
3131 with :
3232 python-version : ' 3.12'
3333 - uses : astral-sh/setup-uv@v3
34+ - name : detect PEP 735
35+ id : pep735
36+ run : |
37+ if grep -q dependency-groups pyproject.toml ; then
38+ echo "found=true" >> $GITHUB_OUTPUT
39+ else
40+ echo "found=false" >> $GITHUB_OUTPUT
41+ fi
42+ - name : pre-commit
43+ if : ${{ steps.pep735.outputs.found }}
44+ run : uv run --only-group pre-commit pre-commit run --all
45+ env :
46+ RUFF_OUTPUT_FORMAT : github
47+ REUSE_OUTPUT_FORMAT : github
3448 - name : Install dependencies
49+ if : ${{ ! steps.pep735.outputs.found }}
3550 run : |
3651 if [ -f requirements-lint.txt ] ; then
3752 uv pip install --system -r requirements-lint.txt
38- elif grep -q dependency-groups pyproject.toml ; then
39- uv sync --only-group pre-commit
4053 else
4154 uv pip install --system $(sed -n 's/.*"\(pre-commit==\([^"]*\)\)".*/\1/p' pyproject.toml)
4255 fi
4356 - name : pre-commit
57+ if : ${{ ! steps.pep735.outputs.found }}
4458 run : pre-commit run --all
4559 env :
4660 RUFF_OUTPUT_FORMAT : github
You can’t perform that action at this time.
0 commit comments