diff options
author | genofire <geno+dev@fireorbit.de> | 2020-06-29 19:34:48 +0200 |
---|---|---|
committer | genofire <geno+dev@fireorbit.de> | 2020-06-29 19:34:48 +0200 |
commit | 091b6e525aacad1abf8d800338d242141dec11c2 (patch) | |
tree | 73137b27409b00a45c76c2bfbf4b5e9d029a4ff1 /.gitlab-ci.yml | |
parent | 1256ea7de8a093f51b116f2802871480cd646ae8 (diff) | |
parent | 044e0334d2bfb9c4b076afc562e4fb3d17c7db20 (diff) |
Merge branch 'add-ci' into 'master'
Add ci
See merge request sum7/ejabberd-tools!6
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 |