This commit is contained in:
jerger 2022-02-24 16:06:56 +01:00
parent a37bb67520
commit 30cca781ce

View file

@ -4,7 +4,6 @@ before_script:
- python --version - python --version
- python -m pip install --upgrade pip - python -m pip install --upgrade pip
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install -r dev_requirements.txt
stages: stages:
- lint - lint
@ -14,30 +13,31 @@ flake8:
stage: lint stage: lint
allow_failure: true allow_failure: true
script: script:
- flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/python/ddadevops/*.py - pip install -r dev_requirements.txt
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics src/python/ddadevops/*.py - flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/*.py
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics src/main/python/ddadevops/*.py
mypy: mypy:
stage: lint stage: lint
allow_failure: true allow_failure: true
script: script:
- python -m mypy src/python/ddadevops/*.py - pip install -r dev_requirements.txt
- python -m mypy src/python/ddadevops/*.py - python -m mypy src/main/python/ddadevops/*.py
pylint: pylint:
stage: lint stage: lint
allow_failure: true allow_failure: true
script: script:
- pylint -d C0301 src/python/ddadevops/*.py - pip install -r dev_requirements.txt
- pylint -d C0301 src/main/python/ddadevops/*.py
pypi-dev: pypi-dev:
stage: upload stage: upload
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never when: never
- if: '$CI_COMMIT_TAG !~ /^release-.*$/' - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_TAG !~ /^release-.*$/'
script: script:
- pip install -r requirements.txt
- pyb publish upload - pyb publish upload
pypi-stable: pypi-stable: