Skip to content

Commit

Permalink
Merge pull request #67 from fingerprintjs/add-docker-INTER-820
Browse files Browse the repository at this point in the history
Add `docker-compose.yml` to run tests
  • Loading branch information
ilfa authored Aug 14, 2024
2 parents adae9e8 + 7ba5dad commit d56caca
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit d56caca

Please sign in to comment.