diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..77492576 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,52 @@ +version: '3.8' + +services: + app: + image: python:3.9-slim + container_name: python_sdk_app_container + working_dir: /app + volumes: + - .:/app + - python_packages:/usr/local/lib/python3.9/site-packages + depends_on: + - install_deps + command: python ./run_checks.py + + install_deps: + image: python:3.9-slim + container_name: python_sdk_install_deps_container + working_dir: /app + volumes: + - .:/app + - .cache/pip:/root/.cache/pip + - python_packages:/usr/local/lib/python3.9/site-packages + command: pip install --no-cache-dir -r requirements.txt + + install_test_deps: + image: python:3.9-slim + container_name: python_sdk_install_test_deps_container + working_dir: /app + volumes: + - .:/app + - .cache/pip:/root/.cache/pip + - python_packages:/usr/local/lib/python3.9/site-packages + depends_on: + - install_deps + command: pip install --no-cache-dir -r test-requirements.txt + + test: + image: python:3.9-slim + container_name: python_sdk_test_container + working_dir: /app + volumes: + - .:/app + - python_packages:/usr/local/lib/python3.9/site-packages + depends_on: + - install_test_deps + command: python -m pytest + env_file: + - .env + +volumes: + python_packages: +