-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (48 loc) · 899 Bytes
/
.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
image: python:3.7-alpine
stages:
- test
- build
- release
# Change pip's cache directory to be inside the runner's
# project directory since only local items can be cached.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
before_script:
- python -V
- pip install tox
python36:
stage: test
image: python:3.6-alpine
script:
- tox -e py36
python37:
stage: test
image: python:3.7-alpine
script:
- tox -e py37
linting:
stage: test
script:
- tox -e flake8
allow_failure: true
package:
stage: build
script:
- python setup.py sdist bdist_wheel
artifacts:
paths:
- dist/
expire_in: 1 month
pypi:
stage: release
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- pip install twine
- twine upload --skip-existing dist/*
only:
- tags