From 75a721e593ffa68d40e927104aaa279b5304bc5f Mon Sep 17 00:00:00 2001 From: jerger Date: Tue, 22 Feb 2022 18:01:08 +0100 Subject: [PATCH] enable gitlab-ci --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e95f15e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +image: "python:3.8" + +before_script: + - python --version + - pip install setuptools wheel twine + - pip install . + +stages: + - lint + - upload + +flake8: + stage: lint + allow_failure: true + script: + - flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/python/ddadevops/*.py + - flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics src/python/ddadevops/*.py + +mypy: + stage: lint + allow_failure: true + script: + - python -m mypy src/python/ddadevops/*.py + - python -m mypy src/python/ddadevops/*.py + +pylint: + stage: lint + allow_failure: true + script: + - pylint -d C0301 src/python/ddadevops/*.py + +pypi-dev: + stage: upload + rules: + - if: '$CI_COMMIT_TAG !~ /^release-.*$/' + script: + - pip install -r requirements.txt + - pyb publish upload + +pypi-stable: + stage: upload + rules: + - if: '$CI_COMMIT_TAG =~ /^release-.*$/' + script: + - pip install -r requirements.txt + - pyb -P version=${{ github.ref }} publish upload