diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5f1e754 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,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 |