forked from Mng-dev-ai/agentrove
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
68 lines (65 loc) · 1.71 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
68 lines (65 loc) · 1.71 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
services:
# Test PostgreSQL database
postgres-test:
image: postgres:13-alpine
container_name: agentrove-postgres-test
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: agentrove_test
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
- test-network
# Test Redis
redis-test:
image: redis:7-alpine
container_name: agentrove-redis-test
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
networks:
- test-network
# Backend test runner
backend-test:
build:
context: .
dockerfile: backend/Dockerfile.test
container_name: agentrove-backend-test
depends_on:
postgres-test:
condition: service_healthy
redis-test:
condition: service_healthy
environment:
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres-test:5432/agentrove_test
- REDIS_URL=redis://redis-test:6379/0
- SECRET_KEY=test_secret_key_that_is_long_enough_for_validation_requirements
- TESTING=true
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=1
- CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN:-}
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- ./backend:/app
- /app/__pycache__
- /app/.pytest_cache
- /var/run/docker.sock:/var/run/docker.sock
command: ["pytest", "-v", "--tb=short"]
networks:
- test-network
- agentrove-sandbox-net
networks:
test-network:
driver: bridge
agentrove-sandbox-net:
driver: bridge