variables: DEFAULT_PY_VERSION: "3.9" doc: # build docs stage: test image: name: registry.gitlab.com/taurus-org/taurus-docker:nodb-$DEFAULT_PY_VERSION variables: PUBLIC_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public before_script: - pip install sphinx sphinx-rtd-theme script: - xvfb-run sphinx-build -qW doc/source/ public artifacts: paths: - public environment: name: Docs-dev url: "https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html" tests: # run test suite with various py versions parallel: matrix: - PY_VERSION: ["3.6", "3.7", "3.8", "3.9"] stage: test image: name: registry.gitlab.com/taurus-org/taurus-docker:nodb-$PY_VERSION before_script: - pip install -e . script: - pytest -n3 --forked -v lib/taurus flake8: # check style with flake8 allow_failure: true stage: test image: name: python:3.9-alpine before_script: - pip install flake8 script: - flake8 . pages: # deploy docs stage: deploy script: - echo "deploying already-built docs " artifacts: paths: - public only: variables: - $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*$/ deploy_to_pypi: stage: deploy image: name: python:3.9-slim-buster before_script: - pip install twine variables: TWINE_USERNAME: $PYPI_USERNAME TWINE_PASSWORD: $PYPI_PASSWORD script: - python setup.py sdist bdist_wheel - twine upload dist/* only: variables: - $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*$/