Newer
Older
# ===== DEFINE DEFAULT DOCKER IMAGE =====
# dockerhub image generated using docker/Dockerfile_simple
# ===== TEST PyWake debian=====
test_PyWake: # name the job what we like
stage: # build, test, deploy defined by default [2]
test
script:
- pip install -e .
- py.test
tags: # only runners with this tag can do the job [3]
- python
# ===== Check code style =====
check_code_style: # name the job what we like
stage: # build, test, deploy defined by default [2]
test
script:
- pip install -e .
- pycodestyle --ignore=E501,W504 py_wake
tags: # only runners with this tag can do the job [3]
- python
# ===== TEST PyWake on Windows =====
test_PyWake_windows: # name the job what we like
stage: # build, test, deploy defined by default [2]
test
script: # runs on windows machine due to tag below
- c:/Anaconda3/envs/pyTopfarm/python.exe -m pytest --cov-report term-missing:skip-covered --cov=py_wake --cov-config .coveragerc
tags: # tag for shared runner on windows machine
- CPAV_old_PC
# ===== build documentation =====
pages: # "pages" is a job specifically for GitLab pages [1]
stage: # build, test, deploy defined by default [2]
deploy
script: # use sphinx to build docs, move to public page
- cd docs; make html
- cd ../; mv docs/build/html public/
artifacts: # required for GitLab pages [1]
paths:
- public
only: # only run for these branches
- master
- test_docs
tags: # only runners with this tag can do the job [3]
- python
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pypi_linux:
image: dtuwindenergy/topfarm2:latest
stage:
deploy
only:
- tags
- test_pypi
script:
- apt-get update
- pip install -e . --upgrade
- python3 -c 'from git_utils import get_tag; get_tag(verbose=True)'
- python3 -m pip install -U setuptools wheel
- python3 setup.py sdist bdist_wheel
- python3 -m pip install -U twine
- python3 -c 'from git_utils import rename_dist_file; rename_dist_file()'
- twine upload dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
#- twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD # for testing purposes
tags:
- python
# current
# pypi_windows:
# stage:
# deploy
# only:
# - tags
# - test_pypi
# script:
# - c:/Anaconda3/envs/pyTopfarm/python.exe setup.py bdist_wheel
# - twine upload dist/* -u %TWINE_USERNAME% -p %TWINE_PASSWORD%
# #- twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u %TWINE_USERNAME% -p %TWINE_PASSWORD% # for testing purposes
# tags:
# - CPAV_old_PC