Commit 86acc2b3 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fix test return status, export htmlcov from docker

parent 5bfdfc03
......@@ -13,6 +13,6 @@ RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \
&& python -m pip install -U -r requirements.prod.txt \
&& python -m pip install coverage
ADD . .
CMD while ! nc -z postgres 5432; do sleep 1; done \
&& ./manage.py makemigrations \
&& ./coverage.sh
#!/bin/bash
#!/bin/bash -eux
BASEDIR="$(dirname $0)"
BASEDIR="$(dirname "$0")"
. "$BASEDIR"/venv/bin/activate
which coverage >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
if ! which coverage > /dev/null 2>&1
then
pip install coverage
fi
coverage run --branch --source=djadhere,accounts,adhesions,banking,services --omit=*/migrations/*.py "$BASEDIR"/manage.py test
coverage run --branch --source=djadhere,accounts,adhesions,banking,services,stocking,todo --omit=*/migrations/*.py "$BASEDIR"/manage.py test
coverage html
coverage report
......@@ -9,3 +9,5 @@ services:
build: .
env_file:
- .env
volumes:
- .:/app
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment