-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
43 lines (40 loc) · 1.21 KB
/
.gitlab-ci.yml
File metadata and controls
43 lines (40 loc) · 1.21 KB
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.10
before_script:
- apt-get update && apt-get install curl default-jre -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-bullseye
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