name: autofix.ci
on:
  pull_request:
  push:
    branches: [ "main", "ci" ]
permissions:
  contents: read
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  autofix:
    runs-on: ubuntu-latest
    steps:
      - uses: mhils/workflows/checkout@v11
      - uses: mhils/workflows/setup-python@v11
      - uses: mhils/workflows/setup-uv@v11

      - run: uv run ruff check --fix-only .
      - run: uv run ruff format .

      - run: uv run test/test_snapshot.py

      - uses: mhils/add-pr-ref-in-changelog@v1

      - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
