-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
55 lines (49 loc) · 1.74 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
image: python:3.7.0
# Change pip's cache directory to be inside the project directory since we can
# # only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
#
# # Pip's cache doesn't store the python packages
# # https://pip.pypa.io/en/stable/reference/pip_install/#caching
# #
# # If you want to also cache the installed packages, you have to install
# # them in a virtualenv and cache it as well.
before_script:
# - apt-get update -y && apt-get install libhdf5-serial-dev -y
- python -V # Print out python version for debugging
- python -m venv venv
- source venv/bin/activate
- pip install -U pip
- "which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )"
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
stages:
- test
- installation_pip
check_code:
tags:
- modern
stage: test
script:
- pip install -U pip
- pip install poetry==1.1.4
- poetry install
- mkdir cert
- echo "$ca_cert" > "./cert/Proteomicsdb-Prosit.crt"
- echo "$cert" > "./cert/ci-pipeline.crt"
- echo "$key" > "./cert/ci-pipeline.key"
- python -m pytest tests/ --cov=prosit_grpc --junitxml=junit.xml --cov-report=xml
artifacts:
reports:
junit: junit.xml
cobertura: coverage.xml
check_simple_installation:
tags:
- modern
stage: installation_pip
script:
- pip install -e git+ssh://[email protected]/proteomics/prosit_tools/prosit_grpc.git@$CI_COMMIT_SHORT_SHA#egg=prosit_grpc