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
66 lines (62 loc) · 1.58 KB
/
docker-compose.test.yml
File metadata and controls
66 lines (62 loc) · 1.58 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
version: '3.8'
services:
# Test PostgreSQL database
postgres-test:
image: postgres:13
container_name: claudex-postgres-test
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: claudex_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: claudex-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: ./backend
dockerfile: Dockerfile.test
container_name: claudex-backend-test
depends_on:
postgres-test:
condition: service_healthy
redis-test:
condition: service_healthy
environment:
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres-test:5432/claudex_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:-}
- E2B_API_KEY=${E2B_API_KEY:-}
volumes:
- ./backend:/app
- /app/__pycache__
- /app/.pytest_cache
command: ["pytest", "-v", "--tb=short"]
networks:
- test-network
networks:
test-network:
driver: bridge