forked from miku/siskin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
38 lines (33 loc) · 1.06 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
# git push sc master => runs CI
#
# git tag v0.1.2
# git push sc --tags => creates package and uploads to Nexus
image: python:3.12.3-slim-bullseye@sha256:6fa552fb879325884b0c1b6792d14ae9500d246c8b19cc27876d84c7c41117ff
stages:
- test
- deploy
before_script:
- pip install --upgrade pip
- pip install pytest twine
tests:
stage: test
script:
- pip install python-daemon --index-url $PYPI_PROXY_URL # error: setuptools 57.4.0 is installed but setuptools>=62.4.0 is required by {'python-daemon'}
- pip install backports.csv # try installing this from pypi, nexus may not like the [.]
- pip install iso-639 # try installing this from pypi, nexus may not like the [.]
- python setup.py develop --index-url $PYPI_PROXY_URL # faster, less load for pypi
- pytest
tags: [docker]
except:
- tags
upload_to_nexus:
stage: deploy
variables:
TWINE_USERNAME: $NEXUS_USERNAME
TWINE_PASSWORD: $NEXUS_PASSWORD
script:
- python setup.py sdist
- twine upload --repository-url $NEXUS_REPOSITORY_URL dist/*
only:
- tags
tags: [docker]