Debian Codegraph @

.github/workflows/autofix.yml

raw
1 name: Auto-fix
2 on:
3 push:
4 pull_request:
5 jobs:
6 style:
7 runs-on: ubuntu-latest
8 steps:
9 - name: Download source
10 uses: actions/checkout@v4
11 - name: Install Python
12 uses: actions/setup-python@v5
13 with:
14 python-version: '3.12'
15 - name: Install Hatch
16 run: |
17 pip install hatch
18 - name: Install dependencies
19 run: |
20 hatch run style:pip freeze
21 - name: Fix code style
22 run: |
23 hatch run style:fix --fix-only
24 - name: Check if any edits are necessary
25 run: |
26 git diff --color --exit-code
27 - name: Apply automatic fixes using pre-commit-ci-lite
28 if: failure() && github.event_name == 'pull_request'
29 uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0