Commit f7685b7c authored by Thomas Dowrick's avatar Thomas Dowrick
Browse files

Forward all env vars to tox

parent 1668f2fd
Pipeline #1477 failed with stage
in 63 minutes and 52 seconds
...@@ -4,58 +4,7 @@ variables: ...@@ -4,58 +4,7 @@ variables:
PYPI_PASS: SECURE PYPI_PASS: SECURE
stages: stages:
- build
- installer
- test - test
- deploy
build docs:
stage: build
script:
- tox -e docs
tags:
- shared-linux
artifacts:
paths:
- doc/
expire_in: 1 week
build linux installer:
stage: build
script:
- tox -e installer
tags:
- shared-linux
artifacts:
paths:
- dist/
expire_in: 1 week
build mac installer:
stage: build
script:
- tox -e installer
tags:
- shared-mac
artifacts:
paths:
- dist/
expire_in: 1 week
build windows installer:
stage: build
script:
- tox -e installer
tags:
- shared-win, gui
artifacts:
paths:
- dist/
expire_in: 1 week
test Linux: test Linux:
stage: test stage: test
...@@ -83,65 +32,4 @@ test Windows: ...@@ -83,65 +32,4 @@ test Windows:
script: script:
- tox - tox
tags: tags:
- shared-win, gui - shared-win, gui
\ No newline at end of file
deploy docs to staging:
stage: deploy
script:
# Note: the group/username directory must already exist on the server before calling this command
- rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* staging_docs_rsync:WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci 2>&1
tags:
- docs-staging
environment:
name: staging
url: http://weisslab-lin.cs.ucl.ac.uk/staging/WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci
only:
- master
dependencies:
- build docs
deploy docs to production:
stage: deploy
script:
# Note: the group/username directory must already exist on the server before calling this command
- rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* production_docs_rsync:WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci 2>&1
tags:
- docs-production
environment:
name: production
only:
- public
dependencies:
- build docs
deploy pip to PyPI:
stage: deploy
when: manual
only:
- tags
environment:
name: PyPI
url: https://pypi.python.org/pypi/scikit-surgeryARDavinci
tags:
- pip-production
artifacts:
paths:
- dist/
script:
# Install packages required to build/publish
# remove any previous distribution files
- pip install wheel twine setuptools
- rm -rf dist
# bundle installer
- python setup.py bdist_wheel
# Upload to pypi
- twine upload --repository pypi dist/* --username $PYPI_USER --password $PYPI_PASS
...@@ -5,11 +5,11 @@ from sksurgeryardavinci.widgets import Viewers ...@@ -5,11 +5,11 @@ from sksurgeryardavinci.widgets import Viewers
from sksurgeryvtk.models.vtk_surface_model_directory_loader \ from sksurgeryvtk.models.vtk_surface_model_directory_loader \
import VTKSurfaceModelDirectoryLoader import VTKSurfaceModelDirectoryLoader
# GUI tests causing error on Linux CI-machine. # # GUI tests causing error on Linux CI-machine.
in_gitlab_ci = str(os.environ.get('GITLAB_CI')) # in_gitlab_ci = str(os.environ.get('GITLAB_CI'))
print("Gitlab_CI: " + in_gitlab_ci) # print("Gitlab_CI: " + in_gitlab_ci)
if sys.platform == "linux" and in_gitlab_ci: # if sys.platform == "linux" and in_gitlab_ci:
pytest.skip("skipping GUI tests on linux CI", allow_module_level=True) # pytest.skip("skipping GUI tests on linux CI", allow_module_level=True)
@pytest.fixture() @pytest.fixture()
def mono_viewer(qtbot): def mono_viewer(qtbot):
......
...@@ -6,11 +6,11 @@ from sksurgeryardavinci.widgets import Viewers ...@@ -6,11 +6,11 @@ from sksurgeryardavinci.widgets import Viewers
from sksurgeryutils.common_overlay_apps import OverlayOnVideoFeed from sksurgeryutils.common_overlay_apps import OverlayOnVideoFeed
# pyint:disable=line-too-long # pyint:disable=line-too-long
# GUI tests causing error on Linux CI-machine. # # GUI tests causing error on Linux CI-machine.
in_gitlab_ci = str(os.environ.get('GITLAB_CI')) # in_gitlab_ci = str(os.environ.get('GITLAB_CI'))
print("Gitlab_CI" + in_gitlab_ci) # print("Gitlab_CI" + in_gitlab_ci)
if sys.platform == "linux" and in_gitlab_ci: # if sys.platform == "linux" and in_gitlab_ci:
pytest.skip("skipping GUI tests on linux CI", allow_module_level=True) # pytest.skip("skipping GUI tests on linux CI", allow_module_level=True)
@pytest.fixture(scope="module") @pytest.fixture(scope="module")
def video_file_source(): def video_file_source():
......
...@@ -8,7 +8,7 @@ python = ...@@ -8,7 +8,7 @@ python =
3.6: py36, docs, lint 3.6: py36, docs, lint
[testenv] [testenv]
passenv = GITLAB_CI passenv = *
deps=-rrequirements-dev.txt deps=-rrequirements-dev.txt
whitelist_externals=coverage,pip whitelist_externals=coverage,pip
# See .coveragerc for list of omitted files # See .coveragerc for list of omitted files
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment