File: autofix.yml

package info (click to toggle)
python-mkdocs 1.6.1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,816 kB
  • sloc: python: 14,346; javascript: 10,535; perl: 143; sh: 57; makefile: 30; xml: 11
file content (23 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: Auto-fix
on:
  push:
  pull_request:
jobs:
  style:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install Python dependencies
        run: |
          python -m pip install --upgrade hatch
      - 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@v1.0.1