diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 610da79f..13b3964d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,8 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 + + - package-ecosystem: pre-commit + directory: / + schedule: + interval: daily diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 00000000..3e5ceda6 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,37 @@ +--- +name: autofix.ci + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@v9.0.0 + + - name: Run fixers + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage pre-commit --no-fail-fast --verbose + env: + UV_NO_CACHE: '1' + UV_PYTHON: 3.14 + + - uses: autofix-ci/action@v1.3.4 + if: always() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a0e1e1d..a1c12482 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,17 +35,15 @@ jobs: cache-dependency-glob: '**/pyproject.toml' - name: Lint - # Use bash to ensure the step fails if any command fails. - # PowerShell does not fail on intermediate command failures by default. - shell: bash - run: uv run --extra=dev prek run --all-files --hook-stage ${{ matrix.hook-stage }} - --verbose + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage ${{ matrix.hook-stage }} --verbose env: + UV_NO_CACHE: '1' UV_PYTHON: ${{ matrix.python-version }} - - uses: pre-commit-ci/lite-action@v1.1.0 - if: always() - completion-lint: needs: build runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86335716..b2441e7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,47 +6,6 @@ fail_fast: true # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - sphinx-lint - - strict-kwargs-fix - - check-manifest - - deptry - - doc8 - - pydocstringformatter - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - ty - - ty-docs - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs - - spelling - - vulture - - vulture-docs - - yamlfix - - zizmor - - pyrefly - - pyrefly-docs - default_install_hook_types: [pre-commit, pre-push] repos: