-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
73 lines (66 loc) · 1.25 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
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
stages:
- test
- build
- docs
- deploy
- .post
test:
stage: test
image: python:3.11.5
script:
- python --version
- python -mpip install pytest
- python -mpip install .
# - pytest -vvv .
build:
stage: build
image: python:3.11.5
script:
- python -mpip install .
- python -mpip install setuptools wheel
- python setup.py sdist bdist_wheel
artifacts:
paths:
- dist/*
docs:
stage: docs
image: python:3.11.5
script:
- python -mpip install .
- python -mpip install \
Sphinx \
pydata-sphinx-theme \
sphinx_design \
numpydoc \
sphinx_copybutton \
sphinx-tabs
- cd doc
- make clean
- make html
- mkdir -p ../public
- mv _build/html/* ../public/
artifacts:
paths:
- public
# deploy:
# stage: deploy
# only:
# - master
# script:
# - pip install twine
# - echo $PYPI_PASSWORD | twine upload --username vmaurer --password-stdin dist/*
pages:
stage: .post
image: busybox
script:
- echo "The site will be deployed to $CI_PAGES_URL"
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH