aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 87a0c5af16776c9adf017e644f603dc03383a065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 virtual environment
    - venv/

# setup environemnt
before_script:
  - python --version
  - pip install virtualenv
  - virtualenv venv
  - source venv/bin/activate
  - pip install -r requirements.txt
  - pip install flake8

stages:
  - syntax
  - pep8

syntax:
  stage: syntax
  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