blob: 5f1e7546a445112dc1e0bce360c5fcf287613d41 (
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:
- .cache/pip # pip caching directory
# setup environemnt
before_script:
- python --version
- pip install -r requirements.txt
- pip install flake8 black
stages:
- syntax
- code consistency
- flake8
syntax:
stage: syntax
script:
# flake8 check only breaking errors ie syntax errors
- flake8 --select=E9,F63,F7,F82 --show-source
black:
stage: code consistency
script:
# code consistency
- black . --check
pep8:
stage: flake8
script:
# full flake8 test
- flake8 --show-source
|