Merge pull request #4716 from hugovk/pre-commit-diff

CI: Show diff when pre-commit fails
This commit is contained in:
Andrew Murray 2020-06-28 20:02:44 +10:00 committed by GitHub
commit 77c098b01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: pip cache - name: pip cache
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: lint-pip-${{ hashFiles('**/setup.py') }} key: lint-pip-${{ hashFiles('**/setup.py') }}
@ -46,4 +46,6 @@ jobs:
- name: Lint - name: Lint
run: tox -e lint run: tox -e lint
env:
PRE_COMMIT_COLOR: always

View File

@ -9,5 +9,5 @@ line_length = 88
multi_line_output = 3 multi_line_output = 3
[tool:pytest] [tool:pytest]
addopts = -ra addopts = -ra --color=yes
testpaths = Tests testpaths = Tests

View File

@ -24,9 +24,10 @@ deps =
[testenv:lint] [testenv:lint]
commands = commands =
pre-commit run --all-files pre-commit run --all-files --show-diff-on-failure
check-manifest check-manifest
deps = deps =
pre-commit pre-commit
check-manifest check-manifest
skip_install = true skip_install = true
passenv = PRE_COMMIT_COLOR