-
Notifications
You must be signed in to change notification settings - Fork 39
/
.gitlab-ci.yml
80 lines (70 loc) · 1.64 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
stages:
- test
- python27
- python37
- python38
- python39
- deploy
variables:
PROJECT_NAME: algorithmia-python
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
RUNNING_ON_BUILD_SERVER: "true"
TWINE_USERNAME: __token__
CLIENT_VERSION: $CI_COMMIT_TAG
deploy:
stage: deploy
only:
- tags
image: python:3.7
script:
# - export CLIENT_VERSION=$(git describe --abbrev=0 2>/dev/null || echo '')
- echo $CLIENT_VERSION
- python -m pip install --upgrade pip
- pip install wheel twine setuptools
- python setup.py sdist bdist_wheel
- python3 setup.py sdist bdist_wheel --universal
- twine upload -r pypi dist/*
test:
stage: test
script:
- if [ -z $ALGORITHMIA_API_KEY ]; then echo "Algorithmia API key not defined"; exit 1; fi
test:pylint:36:
image: python:3.6
script:
- pip install pylint --quiet
- pylint --ignored-classes=_socketobject *.py || echo $?
test:pytest:36:
image: python:3.6
script:
- pip install -r requirements.txt --quiet
- pip install pytest --quiet
- pytest
python27:
stage: python27
image: python:2.7
script:
- pip install -r requirements27.txt --quiet
- pip install pytest --quiet
- pytest
python37:
stage: python37
image: python:3.7
script:
- pip install -r requirements.txt --quiet
- pip install pytest --quiet
- pytest
python38:
stage: python38
image: python:3.8
script:
- pip install -r requirements.txt --quiet
- pip install pytest --quiet
- pytest
python39:
stage: python39
image: python:3.9
script:
- pip install -r requirements.txt --quiet
- pip install pytest --quiet
- pytest