image: "python:3.10" before_script: - python --version - python -m pip install --upgrade pip - pip install -r requirements.txt - export IMAGE_TAG=$CI_IMAGE_TAG - export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER - export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD stages: - lint&test - upload - image flake8: stage: lint&test script: - pip install -r dev_requirements.txt - flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/ - flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --per-file-ignores="__init__.py:F401" --ignore=E722,W503 --statistics src/main/python/ddadevops/ mypy: stage: lint&test script: - pip install -r dev_requirements.txt - python -m mypy src/main/python/ddadevops/ --ignore-missing-imports --disable-error-code=attr-defined --disable-error-code=union-attr pylint: stage: lint&test script: - pip install -r dev_requirements.txt - pylint -d W0511,R0903,C0301,W0614,C0114,C0115,C0116,similarities,W1203,W0702,W0702,R0913,R0902,R0914,R1732,R1705,W0707,C0123,W0703,C0103 src/main/python/ddadevops/ pytest: stage: lint&test script: - pip install -r dev_requirements.txt - pytest pypi-stable: stage: upload rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: never - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - pyb -P version=$CI_COMMIT_TAG publish upload clojure-image-test-publish: image: domaindrivenarchitecture/devops-build:latest stage: image rules: - if: '$CI_COMMIT_TAG != null' script: - cd infrastructure/clojure && pyb image test publish devops-build-image-test-publish: image: domaindrivenarchitecture/devops-build:latest stage: image rules: - if: '$CI_COMMIT_TAG != null' script: - cd infrastructure/devops-build && pyb image test publish