diff --git a/.github/workflows/ci-run-tests.yml b/.github/workflows/ci-run-tests.yml index 34d9660f..543b7f26 100644 --- a/.github/workflows/ci-run-tests.yml +++ b/.github/workflows/ci-run-tests.yml @@ -33,11 +33,8 @@ jobs: - name: Run tests run: | set -x - docker run -i --name=app-test -u root --link=database --link=memcached -e DATABASE_URL="postgres://postgres:password@database/app" -e APP_SECRET_KEY=xxxx -e ENVIRONMENT=test app-test - docker exec app-test ls -a - ls -a - docker cp app-test:/app/.coverage ./ - ls -a + docker run -i --name=app-test -u root --link=database --link=memcached -e DATABASE_URL="postgres://postgres:password@database/app" -e APP_SECRET_KEY=xxxx -e ENVIRONMENT=test -v $(pwd)/coverage:/coverage app-test + cp coverage/.coverage ./ - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index 4048ca65..91a2ed59 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ node_modules ietf/templates/base.html ietf/static/dist docker/database/*.gz -/.coverage +.coverage diff --git a/docker/init-test.sh b/docker/init-test.sh index 112527b9..db4bd6c4 100755 --- a/docker/init-test.sh +++ b/docker/init-test.sh @@ -4,4 +4,5 @@ python /app/manage.py migrate --no-input python /app/manage.py createcachetable python /app/manage.py collectstatic --no-input pytest --cov +if [ -d /coverage ]; then cp .coverage /coverage/; fi python /app/manage.py makemigrations --check --dry-run --no-input