Skip to content

Commit

Permalink
chore: script for tests inside docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rocheleau committed Nov 21, 2024
1 parent 01d9630 commit 8ee9e45
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
6 changes: 0 additions & 6 deletions docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ services:
- $PWD/authz_plugins/api_key/example.env:/tds/lib/.env # map example.env to .env
ports:
- "5000:5000"
command: /bin/bash -c '
cd /tds &&
/poetry_user_install_dev.bash &&
pytest -svv --cov=transcriptomics_data_service --cov-branch &&
coverage html
'

tds-db:
image: postgres:16
Expand Down
8 changes: 0 additions & 8 deletions local-tests.bash

This file was deleted.

16 changes: 16 additions & 0 deletions test-docker.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
export UID=$(id -u)

docker compose -f docker-compose.test.yaml down
docker compose -f docker-compose.test.yaml up -d --build --wait

docker exec tds /bin/bash -c "
cd /tds &&
/poetry_user_install_dev.bash &&
pytest -svv --cov=transcriptomics_data_service --cov-branch &&
coverage html
"

docker compose -f docker-compose.test.yaml down

docker rmi transcriptomics_data_service-tds:latest

0 comments on commit 8ee9e45

Please sign in to comment.