-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
89 lines (83 loc) · 2.17 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
image: continuumio/anaconda3
# ===== TEST ssms linux=====
test_ssms:
stage:
test
script:
- pip install -e .[test]
- python -m pytest
tags:
- debian
# ===== TEST ssms windows=====
test_ssms_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 ssms
- pip install -e . --no-deps
- pytest --cov-report term-missing:skip-covered --cov=ssms --cov-config .coveragerc
tags:
- ANMH_old
# ===== Check code style =====
check_code_style:
stage:
test
script:
- pip install -e . --user
- pycodestyle --ignore=E501,W504,E741 ssms
tags:
- ci-ubuntu
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# ===== DEPLOY ssms docs=====
pages:
stage:
deploy
script:
- apt-get update
- apt-get -y install make pandoc graphviz
- pip install --upgrade pip
- pip install pypandoc
- pip install sphinx --upgrade
- pip install nbsphinx --upgrade
- pip install nbconvert --upgrade
- pip install -e .[docs] --upgrade
- cd docs; make html
- cd ../; mv docs/build/html public/
artifacts:
paths:
- public
only:
- /^test_docdeploy.*/
- main
tags:
- debian
# ===== DEPLOY publish ssms on pypi=====
pypi:
stage:
deploy
only:
- tags
- test_pypi
script:
- apt-get update
- apt-get -y install make pandoc graphviz
- pip install --upgrade pip
- pip install pypandoc
- pip install sphinx --upgrade
- pip install nbsphinx --upgrade
- pip install nbconvert --upgrade
- pip install -e . --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:
- debian