-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
test-docker-compose.yml
62 lines (58 loc) · 1.55 KB
/
test-docker-compose.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
56
57
58
59
60
61
62
version: "3"
services:
postgres_forecast:
image: postgres:14.5
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
postgres_pv:
image: postgres:14.5
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5433:5432"
datamodel:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile
environment:
- DB_URL=postgresql://postgres:postgres@postgres_forecast:5432/postgres
- DB_URL_PV=postgresql://postgres:postgres@postgres_pv:5432/postgres
- GIT_PYTHON_REFRESH=quiet
- LOG_LEVEL=DEBUG
depends_on:
- postgres_forecast
- postgres_pv
volumes:
- ./tests/:/app/tests
- ./nowcasting_datamodel/:/app/nowcasting_datamodel
tests:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile
args:
TESTING: 1
environment:
- DB_URL=postgresql://postgres:postgres@postgres_forecast:5432/postgres
- DB_URL_PV=postgresql://postgres:postgres@postgres_pv:5432/postgres
- GIT_PYTHON_REFRESH=quiet
- LOG_LEVEL=DEBUG
command: >
bash -c "sleep 10
&& pytest --cov=./nowcasting_datamodel
&& coverage report -m
&& coverage xml
&& cp .coverage ./tests/
&& cp coverage.xml ./tests/"
depends_on:
- postgres_forecast
- postgres_pv
- datamodel
volumes:
- ./tests/:/app/tests
- ./nowcasting_datamodel/:/app/nowcasting_datamodel