ejabberd-tools/.gitlab-ci.yml

40 lines
724 B
YAML

image: "python:3.7"
variables:
# force pip cache dir
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
# utilize pip caching
- .cache/pip
# cache the virtualenv to reduce load
- venv/
# setup environemnt
before_script:
- python --version
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
stages:
- syntax
- pep8
syntax:
stage: syntax
before_script:
- pip install flake8
script:
# breaking errors ie syntax errors
- flake8 --select=E9,F63,F7,F82 --show-source
pep8:
stage: pep8
script:
# pep8 warnings
- flake8 --max-complexity=10 --max-line-length=120 --show-source
allow_failure: true