-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (40 loc) · 1.35 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
image: continuumio/miniconda3
stages:
- test
# test environment setup in the server image
#test-env:
# stage: test
# image: $CI_REGISTRY/j.seiffarth/serve-segmentation/server:master
# script:
# - conda env create -f conda.yaml
# execute the segmentation prediction with a test image
test-online-exec:
variables:
SERVICE_LOG_NAME: "/builds/service-logs/logs-${CI_COMMIT_REF_NAME}-${CI_PIPELINE_ID}.txt"
FF_NETWORK_PER_BUILD: "true" # activate container-to-container networking
CONDA_ENV: "cellpose-executor"
stage: test
tags:
- big-ram
services:
- name: $CI_REGISTRY/satomi/seg-serve/server:master
alias: segserve
command:
- /bin/bash
- -c
- "echo $USER; echo Log dir: ${SERVICE_LOG_NAME}; ls /; ls -all /builds; mkdir -p /builds/service-logs; ls /builds; uvicorn --host 0.0.0.0 --port 80 main:app 2>&1 | tee ${SERVICE_LOG_NAME}"
script:
- echo "Log dir ${SERVICE_LOG_NAME}"
- |
(tail -f -n +1 "${SERVICE_LOG_NAME}" | awk '{print "[service-logs]: " $0}' &)
- pip install requests pillow coverage mlflow
- python -m unittest tests/test.py
- python -m coverage run --source=./ -m unittest tests/test.py
- coverage xml
after_script:
- rm ${SERVICE_LOG_NAME}
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml