File: autofix.yml

package info (click to toggle)
mkdocs-section-index 0.3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 486; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Auto-fix
on:
  push:
  pull_request:
jobs:
  style:
    runs-on: ubuntu-latest
    steps:
      - name: Download source
        uses: actions/checkout@v4
      - name: Install Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - name: Install Hatch
        run: |
          pip install hatch
      - name: Install dependencies
        run: |
          hatch run style:pip freeze
      - name: Fix code style
        run: |
          hatch run style:fix --fix-only
      - name: Check if any edits are necessary
        run: |
          git diff --color --exit-code
      - name: Apply automatic fixes using pre-commit-ci-lite
        if: failure() && github.event_name == 'pull_request'
        uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0