attempt to run migrations in ci

This commit is contained in:
jasquat 2022-05-20 13:40:28 -04:00
parent abd16de9aa
commit 21561d2570
2 changed files with 9 additions and 5 deletions

View File

@ -160,6 +160,7 @@ jobs:
- name: Run Nox
run: |
./bin/recreate_db clean
nox --force-color --python=${{ matrix.python }}
- name: Upload coverage data

View File

@ -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"