-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
48 lines (44 loc) · 1.54 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
---
stages:
- build
- test
services:
- postgres:9.5
variables:
POSTGRES_DB: passari_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "testpassword"
POSTGRES_HOST: postgres
POSTGRES_VERSION: "9.5"
build:
stage: build
image: $CI_REGISTRY/passari/passari-test-docker:latest
script:
- python3 setup.py sdist
- mv dist/*.tar.gz dist/${CI_PROJECT_NAME}.tar.gz
artifacts:
paths:
- dist/*.tar.gz
test:
stage: test
image: $CI_REGISTRY/passari/passari-test-docker:latest
script:
- export LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- python3.6 -mvenv .venv
- . .venv/bin/activate
# Install passari-web-ui
- pip install .
# Install passari and passari-workflow
- "curl --location --header \"PRIVATE-TOKEN: ${GITLAB_API_TOKEN}\" -o passari.tar.gz 'https://museopas-gitlab.northeurope.cloudapp.azure.com/api/v4/projects/passari%2Fpassari/jobs/artifacts/master/raw/dist/passari.tar.gz?job=build'"
- "curl --location --header \"PRIVATE-TOKEN: ${GITLAB_API_TOKEN}\" -o passari-workflow.tar.gz 'https://museopas-gitlab.northeurope.cloudapp.azure.com/api/v4/projects/passari%2Fpassari-workflow/jobs/artifacts/master/raw/dist/passari-workflow.tar.gz?job=build'"
- pip install passari.tar.gz
- pip install passari-workflow.tar.gz
# Install testing tools and run tests
- pip install -r requirements_dev.txt
- pytest
--postgresql-host $POSTGRES_HOST
--postgresql-user $POSTGRES_USER
--postgresql-port 5432
-vv --cov passari_web_ui
coverage: '/TOTAL.*\s+(\d+%)$/'