-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-test.yaml
29 lines (29 loc) · 992 Bytes
/
docker-compose-test.yaml
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
# PY_VER=3.12 VERSION=$(cat discordai_modelizer/version.py | grep -oP '\d+\.\d+\.\d+') docker compose -f docker-compose-test.yaml --env-file .env.test up --build
# docker exec -it discordai-modelizer-tests-1 bash
services:
tests:
build:
context: .
dockerfile: Dockerfile
args:
- PY_VER
image: discord-ai/discordai_modelizer:py${PY_VER}-v${VERSION}
working_dir: /main
environment:
- DISCORD_BOT_TOKEN
- OPENAI_API_KEY
- CHANNEL_ID
- USERNAME
- PYTHONUNBUFFERED=1
env_file: .env.test
volumes:
- ./discordai_modelizer:/usr/local/lib/python${PY_VER}/site-packages/discordai_modelizer
- ./tests:/main/tests
- .coveragerc:/main/.coveragerc
command:
- sh
- -c
- |
pip install pytest pytest-cov pytest-console-scripts --root-user-action ignore
pytest --cov-report term-missing --cov=discordai_modelizer --cov-config=.coveragerc tests
# tail -f /dev/null