Template upgrade #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] |