diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f420a9f5..49023161 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,3 +38,12 @@ test: stage: test script: - python manage.py test + +cleanup: + stage: cleanup + script: + # If an uncaught error occurs, the test database has to be destroyed + # manually + - mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host="$DBHOST" + -e "DROP DATABASE test_$DBNAME" || true + when: on_failure