diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc2d2df4..02248c65 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,9 +43,9 @@ jobs: - name: Lint with black run: pre-commit run black --show-diff-on-failure - name: Lint with flake8 - run: pre-commit run flake8 + run: pre-commit run flake8 --hook-stage manual - name: Check types with mypy - run: pre-commit run mypy + run: pre-commit run mypy --hook-stage manual rule_linter: runs-on: ubuntu-20.04 @@ -98,7 +98,7 @@ jobs: - name: Run tests (fast) # this set of tests runs about 80% of the cases in 20% of the time, # and should catch most errors quickly. - run: pre-commit run pytest-fast --all-files + run: pre-commit run pytest-fast --all-files --hook-stage manual - name: Run tests run: pytest -v tests/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 10e68d5c..17129385 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: isort name: isort - stages: [commit, push] + stages: [commit, push, manual] language: system entry: isort args: @@ -45,7 +45,7 @@ repos: hooks: - id: black name: black - stages: [commit, push] + stages: [commit, push, manual] language: system entry: black args: @@ -62,7 +62,7 @@ repos: hooks: - id: ruff name: ruff - stages: [commit, push] + stages: [commit, push, manual] language: system entry: ruff args: @@ -79,7 +79,7 @@ repos: hooks: - id: flake8 name: flake8 - stages: [push] + stages: [push, manual] language: system entry: flake8 args: @@ -97,7 +97,7 @@ repos: hooks: - id: mypy name: mypy - stages: [push] + stages: [push, manual] language: system entry: mypy args: diff --git a/doc/installation.md b/doc/installation.md index 65258e45..b45f9a58 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -107,16 +107,17 @@ We use [pre-commit](https://pre-commit.com/) so that its trivial to run the same Run all linters liks: - ❯ pre-commit run --all-files + ❯ pre-commit run --hook-stage manual isort....................................................................Passed black....................................................................Passed ruff.....................................................................Passed flake8...................................................................Passed mypy.....................................................................Passed + pytest (fast)............................................................Passed Or run a single linter like: - ❯ pre-commit run --all-files isort + ❯ pre-commit run --hook-stage manual isort isort....................................................................Passed