-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
74 lines (68 loc) · 1.66 KB
/
docker-compose.test.yml
File metadata and controls
74 lines (68 loc) · 1.66 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
x-test-app: &test-app
build:
target: test
image: codepraise-api-python:test
volumes:
- ./config/secrets:/app/config/secrets
- ./app/infrastructure/gitrepo/repostore:/app/app/infrastructure/gitrepo/repostore
- ./coverage:/app/coverage
environment:
- API_URL=http://api:8080
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- CLONE_QUEUE
- GH_TOKEN
x-test-ci: &test-ci
build:
target: test
image: codepraise-api-python:test
volumes:
- ./app/infrastructure/gitrepo/repostore:/app/app/infrastructure/gitrepo/repostore
- ./coverage:/app/coverage
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- CLONE_QUEUE
- GH_TOKEN
services:
worker:
<<: *test-app
profiles:
- tdd
- bdd
command: inv worker.run.test
# `$ docker compose -f docker-compose.test.yml run --rm test`
test:
<<: *test-app
depends_on:
- worker
profiles:
- tdd
command: inv test
# For the usage of frontend BDD testing only
# `$ docker compose -f docker-compose.test.yml --profile bdd up`
api:
<<: *test-app
profiles:
- bdd
ports:
- ${PORT:-8080}:8080
command: inv api.run.test -h 0.0.0.0
# For CI with GitHub Actions
# `$ docker compose -f docker-compose.test.yml run --no-TTY test-ci`
# `--no-TTY` is necessary for showing streaming logs
# ref: https://github.com/github/feedback/discussions/11011#discussioncomment-2242923
worker-ci:
<<: *test-ci
profiles:
- ci
command: inv worker.run.test
test-ci:
<<: *test-ci
profiles:
- ci
depends_on:
- worker-ci
command: inv test