kopia lustrzana https://github.com/wagtail/wagtail
Fix caching setup for Python dependencies in CircleCI
rodzic
3651e5f21b
commit
7523d65d84
|
@ -4,17 +4,21 @@ jobs:
|
||||||
backend:
|
backend:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.8.11
|
- image: cimg/python:3.8.11
|
||||||
|
environment:
|
||||||
|
PIPENV_VENV_IN_PROJECT: true
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
key: pipenv-v1-{{ checksum "setup.py" }}
|
||||||
- pip-packages-v1-{{ .Branch }}
|
# Only install if .venv wasn’t cached.
|
||||||
- pip-packages-v1-
|
- run: |
|
||||||
- run: pipenv install -e .[testing]
|
if [[ ! -e ".venv" ]]; then
|
||||||
|
pipenv install -e .[testing]
|
||||||
|
fi
|
||||||
- save_cache:
|
- save_cache:
|
||||||
|
key: pipenv-v1-{{ checksum "setup.py" }}
|
||||||
paths:
|
paths:
|
||||||
- ~/.local/
|
- .venv
|
||||||
key: pip-package-v1-{{ .Branch }}
|
|
||||||
- run: pipenv run flake8
|
- run: pipenv run flake8
|
||||||
- run: pipenv run isort --check-only --diff .
|
- run: pipenv run isort --check-only --diff .
|
||||||
# Filter out known false positives, while preserving normal output and error codes.
|
# Filter out known false positives, while preserving normal output and error codes.
|
||||||
|
|
|
@ -11,7 +11,7 @@ python-tag = py3
|
||||||
# W503: line break before binary operator (superseded by W504 line break after binary operator)
|
# W503: line break before binary operator (superseded by W504 line break after binary operator)
|
||||||
# N806: Variable in function should be lowercase
|
# N806: Variable in function should be lowercase
|
||||||
ignore = D100,D101,D102,D103,D105,E501,W503,N806
|
ignore = D100,D101,D102,D103,D105,E501,W503,N806
|
||||||
exclude = wagtail/project_template/*,node_modules,venv
|
exclude = wagtail/project_template/*,node_modules,venv,.venv
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
|
@ -21,7 +21,7 @@ ignore-path = _build,docs/_build
|
||||||
[isort]
|
[isort]
|
||||||
line_length=100
|
line_length=100
|
||||||
multi_line_output=4
|
multi_line_output=4
|
||||||
skip=migrations,project_template,node_modules,.git,__pycache__,LC_MESSAGES,venv
|
skip=migrations,project_template,node_modules,.git,__pycache__,LC_MESSAGES,venv,.venv
|
||||||
blocked_extensions=rst,html,js,svg,txt,css,scss,png,snap,tsx
|
blocked_extensions=rst,html,js,svg,txt,css,scss,png,snap,tsx
|
||||||
known_first_party=wagtail
|
known_first_party=wagtail
|
||||||
default_section=THIRDPARTY
|
default_section=THIRDPARTY
|
||||||
|
|
Ładowanie…
Reference in New Issue