diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30dbadb..76c688e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,16 +8,12 @@ ci: # aislop also runs engines that can call the network at scan time # (dependency audits), so it cannot run in the sandbox either. # - # pytest runs through 'uv run' against the project's own environment, - # which the sandbox does not provide. - # # Adapted from actions-template for a Python-only repository: the # template's eslint and Go hooks, and the manifest guard they share, # are omitted because this repository has no JavaScript or Go sources. skip: - gha-workflow-linter - aislop - - pytest autofix_commit_msg: | Chore: Pre-commit autofixes @@ -240,19 +236,6 @@ repos: pass_filenames: false always_run: true - # Run the unit tests before each commit. A local system hook using the - # project's own uv environment, so it needs 'uv sync --extra dev' first; - # skipped on pre-commit.ci (see ci.skip above). - - repo: local - hooks: - - id: pytest - name: pytest - entry: uv - args: [run, pytest, --tb=short, -q] - language: system - pass_filenames: false - always_run: true - - repo: https://github.com/python-jsonschema/check-jsonschema rev: 39478bf2c099a58683d3f1aedf675105318b078d # frozen: 0.39.0 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc37bab..2c7e81b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,9 +82,13 @@ prek run --files ``` The hooks include ruff, mypy, basedpyright, markdownlint, write-good, -shellcheck, actionlint, gitleaks, reuse, gitlint and pytest. basedpyright -checks the whole project and fails on warnings as well as errors. Do not -bypass the hooks with `--no-verify`. +shellcheck, actionlint, gitleaks, reuse and gitlint. basedpyright checks +the whole project and fails on warnings as well as errors. Do not bypass +the hooks with `--no-verify`. The hooks do not run the tests. Run +`uv run pytest` locally before you push. CI runs the tests too, but +only on pull requests that change a file outside `.github/`, the root +dotfiles and `tox.ini`; see the path filters in +`.github/workflows/build-test.yaml`. ### Commit Messages