forked from Sensirion/python-i2c-sen5x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (49 loc) · 1.63 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
include: https://gitlab.sensirion.lokal/Sensirion/Python/ci-config-python/raw/master/gitlab-ci-template-v2.yml
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
check_rst_syntax:
extends: .check_rst_syntax_v2
check_editorconfig:
extends: .check_editorconfig_v2
py3p8_linux_sdist:
extends: .py3p8_linux_sdist_v2
py3p6_linux_build:
extends: .py3p6_linux_build_v2
py3p8_linux_build:
extends: .py3p8_linux_build_v2
py3p5_64bit_win_build:
extends: .py3p5_64bit_win_docker_build_v2
py3p8_64bit_win_build:
extends: .py3p8_64bit_win_docker_build_v2
build_docs:
extends: .build_docs_v2
script:
- python setup.py install
- pip install -r docs/requirements.txt
- ./ci/set_git_config.sh
- sphinx-versioning build -r "$CI_COMMIT_REF_NAME" -w "$CI_COMMIT_REF_NAME" docs docs/_build/html
deploy_staging:
extends: .deploy_staging_v2
deploy_stable:
extends: .deploy_stable_v2
environment:
name: pypi.org
url: https://pypi.org/project/sensirion-i2c-sen5x/
before_script:
- pip install twine~=1.12.1
script:
- PKG_VERSION=$(python setup.py --version --quiet | tail -n1)
- TAG_VERSION=$(git describe --tags)
- if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then echo "Tag Version ($TAG_VERSION) != Package Version ($PKG_VERSION)" && exit 1; fi
- twine upload dist/*
deploy_docs:
stage: deploy
tags: [linux, docker]
image: registry.gitlab.sensirion.lokal/sensirion/docker/docker-python:3.6-18.04-2.7.0
dependencies: []
only: [master, tags]
script:
- python setup.py install
- pip install -r docs/requirements.txt
- ./ci/set_git_config.sh
- sphinx-versioning push docs gh-pages .