-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
44 lines (40 loc) · 1.21 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
stages:
- test
- deploy
test:
stage: test
image: python:3.8.7-slim-buster
before_script:
- apt-get update && apt-get install curl -y
- mkdir /tmp/nextflow && cd /tmp/nextflow && (curl -s https://get.nextflow.io | bash) && chmod 755 nextflow $$ export PATH=/tmp/:$PATH && cd -
- nextflow -version
- python -m pip install --upgrade pip
- pip install pytest certifi twine
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- python setup.py install
# reduce the default SSL security level to get around a misconfiguration in the Ensembl server
# https://github.com/Ensembl/ensembl-rest/issues/427
# See https://askubuntu.com/a/1233456
- sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/' /usr/lib/ssl/openssl.cnf
script:
- PYTHONPATH=. pytest tests
environment:
name: test-env
only:
- external_pull_requests
- tags
- master
deploy-python-package-production:
stage: deploy
image: python:3.8.7-slim-buster
script:
- python setup.py sdist
- twine upload dist/*
dependencies:
- test
variables:
TWINE_NON_INTERACTIVE: "true"
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
only:
- tags