diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000000..19bd8180dc --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,32 @@ +# The workflow name is mandated by autofix.ci. +# It needs to be a dedicated workflow, as autofix.ci times out on long runs. +name: autofix.ci + +on: + pull_request: + +env: + FORCE_COLOR: "1" + UV_COMPILE_BYTECODE: "1" + +permissions: + contents: read + +jobs: + lint: + name: Pre-commit checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + filter: blob:none + persist-credentials: false + - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 + with: + enable-cache: true + - run: uv tool install hatch + - name: Run pre-commit hooks + run: uvx prek run --all-files --show-diff-on-failure --color=always + - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4 + if: ${{ !cancelled() }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aab710221c..9339a1b080 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: autofix.ci +name: CI on: push: @@ -121,28 +121,12 @@ jobs: - run: uvx --from build pyproject-build --sdist --wheel . - run: uvx twine check dist/* - lint: - name: Pre-commit checks - runs-on: ubuntu-latest - permissions: {} - steps: - - *clone - - *setup-uv - - run: uv tool install hatch - - name: Run pre-commit hooks - run: uvx prek run --all-files --show-diff-on-failure --color=always - env: - SKIP: no-commit-to-branch - - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4 - if: ${{ !cancelled() }} - check: if: always() needs: - get-environments - test - build - - lint runs-on: ubuntu-latest steps: - uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0