Commit 39508bd1 authored by hynek's avatar hynek 🤤
Browse files

ci(tests): create script to prepare and run tests

parent 88bcef37
......@@ -48,7 +48,7 @@ tests:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- echo "Composing CI setup with $CONTAINER_TEST_IMAGE"
- docker-compose -f ci.yml build
- docker-compose -f ci.yml run django /bin/sh -c "./manage.py makemigrations && ./manage.py migrate && coverage run -m pytest"
- docker-compose -f ci.yml run django /bin/sh -c "run_pytest"
- docker-compose -f ci.yml run --rm django coverage html
- docker-compose -f ci.yml run --rm django /bin/sh -c "cd docs && apk add make && make html"
- docker-compose -f ci.yml run django coverage report
......
#!/bin/sh
echo "preparing tests..."
cp ./discuss_data/dhrep/fixtures/* /app/discuss_data/media/
echo "making migrations..."
./manage.py makemigrations
echo "migrating..."
./manage.py migrate
echo "running pytest"
coverage run -m pytest
\ No newline at end of file
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