diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index becb9d08..81b1b018 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -160,6 +160,7 @@ jobs: - name: Run Nox run: | + ./bin/recreate_db clean nox --force-color --python=${{ matrix.python }} - name: Upload coverage data diff --git a/bin/recreate_db b/bin/recreate_db index 9f0f116d..d2ede16c 100755 --- a/bin/recreate_db +++ b/bin/recreate_db @@ -12,12 +12,15 @@ if [[ "${1:-}" == "clean" ]]; then tasks="$tasks init" rm -rf migrations/ - rm -f ./src/spiff_workflow_webapp/db.sqlite3 - mysql -uroot -e "DROP DATABASE IF EXISTS spiff_workflow_webapp_development" - mysql -uroot -e "CREATE DATABASE spiff_workflow_webapp_development" - mysql -uroot -e "DROP DATABASE IF EXISTS spiff_workflow_webapp_testing" - mysql -uroot -e "CREATE DATABASE spiff_workflow_webapp_testing" + # if [[ "${TEST_DATABASE_TYPE:-}" == "sqlite" ]]; then + # rm -f ./src/spiff_workflow_webapp/db.sqlite3 + # else + # mysql -uroot -e "DROP DATABASE IF EXISTS spiff_workflow_webapp_development" + # mysql -uroot -e "CREATE DATABASE spiff_workflow_webapp_development" + # mysql -uroot -e "DROP DATABASE IF EXISTS spiff_workflow_webapp_testing" + # mysql -uroot -e "CREATE DATABASE spiff_workflow_webapp_testing" + # fi fi tasks="$tasks migrate upgrade"