# This file is a template, and might need editing before it works on your project. # Official language image. Look for the different tagged releases at: # https://hub.docker.com/r/library/python/tags/ stages: - test - build - deploy # Change pip's cache directory to be inside the project directory since we can # only cache local items. variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" # Pip's cache doesn't store the python packages # https://pip.pypa.io/en/stable/reference/pip_install/#caching # # If you want to also cache the installed packages, you have to install # them in a virtualenv and cache it as well. cache: paths: - .cache/pip - venv/ before_script: # OUTSIDE VIRTUAL ENV ----------------------------------------------------- - python -V - python -m ensurepip - python -m pip install -U pip - python -m pip install -U setuptools - python -m pip install -U wheel - python -m pip install -U virtualenv - python -m pip install -U tox # Python 2.7 end of support 2020-01 # Python 3.4 end of support 2019-03 # Python 3.5 end of support 2020-09 # End of support 2021-12 py36-build: stage: build image: python:3.6 script: - export TOXENV=py36-build - tox -s true # End of support 2023-06 py37-build: stage: build image: python:3.7 script: - export TOXENV=py37-build - tox -s true # End of support 2024-10 py38-build: stage: build image: python:3.8 script: - export TOXENV=py38-build - tox -s true py38-test: stage: test image: python:3.8 script: - export TOXENV=py38-test - tox -s true py38-lint: stage: test image: python:3.8 allow_failure: false script: - export TOXENV=py38-lint - tox -r -s true py38-safety: stage: test image: python:3.8 script: - export TOXENV=py38-safety - tox -s true py38-metric: stage: test image: python:3.8 script: - export TOXENV=py38-metric - tox -s true include: - template: Code-Quality.gitlab-ci.yml # py36-test-pyqt: # stage: test # image: python:3.6 # script: # - export TOXENV=py36-test-pyqt # - tox -s true # py36-test-pyside: # stage: test # image: python:3.6 # script: # - export TOXENV=py36-test-pyside # - tox -s true py36-release-pypi: stage: deploy image: python:3.6 script: - pip install twine - python setup.py sdist bdist_wheel - echo $CI_COMMIT_TAG - twine check dist/* # try upload in test platform before the oficial - twine upload --repository-url https://test.pypi.org/legacy/ dist/* - pip install --no-deps --index-url https://test.pypi.org/simple/ helpdev - pip uninstall helpdev -y # upload to oficial - twine upload --repository-url https://upload.pypi.org/legacy/ dist/* - pip install helpdev - helpdev --version - pip uninstall helpdev -y only: - tags