-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
85 lines (72 loc) · 1.49 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
image: python
variables:
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
before_script:
- pip install -r .requirements_dev.txt
- pip install .
# - curl -O https://bootstrap.pypa.io/get-pip.py
# - python get-pip.py
# - pip install -r requirements_dev.txt
# after_script:
# - pip install codecov
# # - codecov --token=<>
stages:
- quick-checks
- build
- test
- coverage
- deploy
- cleanup
linters:
image: python:3.6
stage: quick-checks
script:
- make lint
# - tox -e linters
build:
stage: build
script:
- make install
- make dist
artifacts:
paths:
- dist/
expire_in: 1 week
python2:
image: python:2.7
stage: test
script: tox -e py27
python36:
image: python:3.6
stage: test
script: tox -e py36
python37:
image: python:3.7
stage: test
script: tox -e py37
coverage:
stage: test
script: make coverage
# docs:
# stage: test
# script: make docs
deploy_pypi:
image: python
stage: deploy
script:
- echo "[pypi]" >> ~/.pypirc
- echo "username =" $PYPI_USER >> ~/.pypirc
- echo "password =" $PYPI_PASSWORD >> ~/.pypirc
- pip install -U twine setuptools
- python setup.py check sdist bdist_wheel
- twine upload dist/*
only:
- tags
except:
- branches
cleanup_pypirc:
image: python
stage: cleanup
when: always # this is important; run even if preceding stages failed.
script:
- rm -vf ~/.pypirc # we don't want to leave these around, but GitLab may clean up anyway.