-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
46 lines (37 loc) · 1.28 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
stages:
- testing
- documentation
- deploy
# This is the latest stable release of Python.
python_latest:
stage: testing
image: python:latest
before_script:
- python -V # Print out python version for debugging
- pip install -r requirements.txt # Install dependencies.
script: # Run test scripts.
- python ./tests/player.py
# This attempts building the documentation.
documentation:
stage: documentation
image: python:latest
before_script:
- python -V # Print out python version for debugging
- pip install -r requirements.txt # Install dependencies.
script: # Run test scripts.
- pip install sphinx sphinx-rtd-theme
- cd docs/
- make html
- mv _build/html/ ../public/
# Automatically deploy to PyPi.
pypi_deploy:
stage: deploy
image: python:latest
script:
- echo "password=$pypikey" >> .pypirc
- cp .pypirc $HOME/.pypirc
- pip install twine
- python setup.py sdist upload
allow_failure: true
# Allow failures in the deploy stage, as this is most likely the version number not being incremented.
# I would prefer this to show a (!) warning over a (X) failure.