-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.gitlab-ci.yml
72 lines (65 loc) · 1.48 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
---
image: docker:latest
stages:
- test
- build
- upload-test
- release
pylint-2.7:
stage: test
image: python:2.7-alpine
script:
- apk add --update py-pip gcc libc-dev
- pip install -Ur requirements.txt
- pip install pylint
- pylint --disable=C1001 opvault/
pylint-3.6:
stage: test
image: python:3.6-alpine
script:
- apk add --update py-pip gcc libc-dev
- pip install -Ur requirements.txt
- pip install pylint
- pylint opvault/
pylint-3.7:
stage: test
image: python:3.7-alpine
script:
- apk add --update py-pip gcc libc-dev
- pip install -Ur requirements.txt
- pip install pylint
- pylint opvault/
package:
stage: build
image: python:3.7-alpine
artifacts:
paths:
- dist/*
expire_in: 1 week
script:
- pip install --upgrade setuptools wheel
- python3 setup.py sdist bdist_wheel
twine-test:
stage: upload-test
image: python:3.7-alpine
dependencies:
- package
script:
- apk add --update py-pip gcc libc-dev libffi-dev openssl-dev
- pip install --upgrade twine
- find dist/
- twine upload -u $TEST_TWINE_USERNAME -p $TEST_TWINE_PASSWORD --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
only:
- tags
twine:
stage: release
image: python:3.7-alpine
dependencies:
- package
script:
- apk add --update py-pip gcc libc-dev libffi-dev openssl-dev
- pip install --upgrade twine
- find dist/
- twine upload dist/*
only:
- tags