From dd92c61b8cb453454f7e7b0a132c7d9ebdb189c8 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Mon, 26 Oct 2026 13:38:30 -0500 Subject: [PATCH] Add pre-commit validators to tox and CI These confirm the correctness of the repo config and the hooks config. --- .github/workflows/build.yaml | 2 +- tox.ini | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index df1ae4306..77234e5fa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,7 +7,7 @@ jobs: run-tox-env: strategy: matrix: - toxenv: [mypy, twine-check, check-sdist] + toxenv: [mypy, twine-check, check-sdist, check-precommit-configs] py: ["3.x"] include: - toxenv: py-mindeps diff --git a/tox.ini b/tox.ini index 92aada7fc..14facade0 100644 --- a/tox.ini +++ b/tox.ini @@ -97,6 +97,14 @@ skip_install = true dependency_groups = check-package-metadata commands = check-sdist --inject-junk +[testenv:check-precommit-configs] +description = "validate pre-commit configuration files" +skip_install = true +deps = pre-commit +commands = + pre-commit validate-config .pre-commit-config.yaml + pre-commit validate-manifest .pre-commit-hooks.yaml + [testenv:vendor-schemas] description = "update the vendored schemas" deps = pre-commit