image: "python:3.7" variables: # force pip cache dir PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" cache: paths: - .cache/pip # pip caching directory # setup environemnt before_script: - python --version - pip install -r requirements.txt - pip install flake8 black stages: - syntax - black - pep8 syntax: stage: syntax script: # breaking errors ie syntax errors - flake8 --select=E9,F63,F7,F82 --show-source black: stage: black script: # code consistency - black . --check --line-length 120 pep8: stage: pep8 script: # pep8 warnings and other non breaking warnings - flake8 --max-complexity=10 --max-line-length=120 --show-source allow_failure: true