-
Notifications
You must be signed in to change notification settings - Fork 101
/
.gitlab-ci.yml
64 lines (51 loc) · 1016 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
61
62
63
64
stages:
- test
- publish
# base test job
.test:
stage: test
before_script:
- pip install pipenv
- pipenv install --dev --skip-lock
script:
- pipenv run pytest tests/
only:
refs:
- merge_requests
- master
- main
- external_pull_requests
test:3.5:
extends: .test
image: python:3.5-buster
test:3.6:
extends: .test
image: python:3.6-buster
test:3.7:
extends: .test
image: python:3.7-buster
test:3.8:
extends: .test
image: python:3.8-buster
.publish:
stage: publish
image: python:3.7-buster
before_script:
- pip install setuptools wheel twine
- python setup.py sdist bdist_wheel
- twine check dist/*
publish:staging:
extends: .publish
script:
- twine upload --repository-url https://test.pypi.org/legacy/ dist/*
only:
refs:
- /^v[0-9]+\.[0-9]+\.[0-9]-rc\.[1-9]+$/
publish:prod:
extends: .publish
when: manual
script:
- twine upload dist/*
only:
refs:
- /^v[0-9]+\.[0-9]+\.[0-9]$/