-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (43 loc) · 1.09 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
image: python:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
before_script:
- apt-get update
- apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
- git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
- pip install virtualenv
- virtualenv venv
test:
script:
- pyenv install 3.6.0
- pyenv install 3.10.0
- source venv/bin/activate
- pyenv local 3.6.0 3.10.0
- pip install tox tox-pyenv
- tox
run:
script:
- source venv/bin/activate
- python setup.py bdist_wheel --universal
artifacts:
paths:
- dist/*.whl
pages:
script:
- source venv/bin/activate
- pip install sphinx sphinx-rtd-theme sphinx-autoapi
- cd doc
- make html
- mv _build/html/ ../public/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH