You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dda-devops-build/.gitlab-ci.yml

50 lines
1.1 KiB
YAML

2 years ago
image: "python:3.8"
before_script:
- python --version
2 years ago
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
2 years ago
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:
2 years ago
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
2 years ago
- if: '$CI_COMMIT_TAG !~ /^release-.*$/'
script:
- pip install -r requirements.txt
- pyb publish upload
pypi-stable:
stage: upload
rules:
2 years ago
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
2 years ago
- if: '$CI_COMMIT_TAG =~ /^release-.*$/'
script:
- pyb -P version=${{ github.ref }} publish upload