forked from taurus-org/taurus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use a matrix to test on py 3.6-3.9 - Add doc test and deployment - Add flake8 test
- Loading branch information
Carlos Pascual
committed
Mar 17, 2021
1 parent
4ab2708
commit 7f7933f
Showing
1 changed file
with
62 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]+.*$/ | ||
|
||
|
||
|