mirror of https://github.com/pypa/pip
Better way to run slow linters in CI only
Taking advantage of pre-commit's manual stage.
This commit is contained in:
parent
e25b183459
commit
fe3aec0f5e
|
@ -1,7 +0,0 @@
|
|||
# Slow pre-commit checks we don't want to run locally with each commit.
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/mgedmin/check-manifest
|
||||
rev: '0.43'
|
||||
hooks:
|
||||
- id: check-manifest
|
|
@ -93,3 +93,9 @@ repos:
|
|||
entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst
|
||||
exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst)
|
||||
files: ^news/
|
||||
|
||||
- repo: https://github.com/mgedmin/check-manifest
|
||||
rev: '0.46'
|
||||
hooks:
|
||||
- id: check-manifest
|
||||
stages: [manual]
|
||||
|
|
|
@ -17,7 +17,6 @@ exclude .appveyor.yml
|
|||
exclude .travis.yml
|
||||
exclude .readthedocs.yml
|
||||
exclude .pre-commit-config.yaml
|
||||
exclude .pre-commit-config-slow.yaml
|
||||
exclude tox.ini
|
||||
exclude noxfile.py
|
||||
|
||||
|
|
|
@ -147,11 +147,9 @@ def lint(session):
|
|||
args = session.posargs + ["--all-files"]
|
||||
else:
|
||||
args = ["--all-files", "--show-diff-on-failure"]
|
||||
args.append("--hook-stage=manual")
|
||||
|
||||
session.run("pre-commit", "run", *args)
|
||||
session.run(
|
||||
"pre-commit", "run", "-c", ".pre-commit-config-slow.yaml", *args
|
||||
)
|
||||
|
||||
|
||||
@nox.session
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -63,8 +63,7 @@ skip_install = True
|
|||
commands_pre =
|
||||
deps = pre-commit
|
||||
commands =
|
||||
pre-commit run [] --all-files --show-diff-on-failure
|
||||
pre-commit run [] -c .pre-commit-config-slow.yaml --all-files --show-diff-on-failure
|
||||
pre-commit run [] --all-files --show-diff-on-failure --hook-stage=manual
|
||||
|
||||
[testenv:vendoring]
|
||||
basepython = python3
|
||||
|
|
Loading…
Reference in New Issue