diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6e34eb91..3c078fd0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,63 @@ -nodb: - stage: test - image: - name: registry.gitlab.com/taurus-org/taurus-docker:nodb - before_script: - - pip install -e . - script: - - pytest -n3 --forked -v lib/taurus +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]+.*$/ + +