-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
73 lines (68 loc) · 1.86 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
image: dtuwindenergy/hydesign:0.0.12
# ===== TEST hydesign linux=====
test_hydesign:
stage:
test
script:
- pip install .[test]
- python -m pytest
tags:
- linux
# ===== TEST hydesign windows=====
test_hydesign_windows:
stage:
test
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
script:
- conda init powershell
- "if (test-path $PROFILE.CurrentUserAllHosts) { & $PROFILE.CurrentUserAllHosts}"
- conda activate hydesign113
- pip install -e . --no-deps
- pytest --cov-report term-missing:skip-covered --cov=hydesign --cov-config .coveragerc
tags:
- ANMH_old
# ===== DEPLOY hydesign docs=====
pages:
stage:
deploy
script:
- pip install --upgrade pip ipython ipykernel
# - pip install pypandoc
# - pip install sphinx --upgrade
# - pip install nbsphinx --upgrade
# - pip install nbconvert --upgrade
# - pip install sphinx_rtd_theme
- ipython kernel install --name "python3" --user
- pip install .[docs] --upgrade
- cd docs; make html
- cd ../; mv docs/build/html public/
artifacts:
paths:
- public
only:
- /^test_docdeploy.*/
- main
tags:
- linux
# ===== DEPLOY publish hydesign on pypi=====
pypi:
stage:
deploy
only:
- tags
- test_pypi
script:
- apt-get update
- apt-get install -y pandoc
- pip install --upgrade pip
- pip install pypandoc
- pip install . --upgrade
- python -c 'from git_utils import get_tag; get_tag(verbose=True)'
- python -m pip install -U setuptools wheel
- python setup.py sdist bdist_wheel
- python -m pip install -U twine
- python -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:
- linux