do not commite sqlite3 files and run correct flask db upgrade command w/ burnettk

This commit is contained in:
jasquat 2022-05-20 14:30:11 -04:00
parent 0c1c9dcec5
commit 7e2cde1881
5 changed files with 5 additions and 7 deletions

5
.gitignore vendored
View File

@ -8,7 +8,4 @@
/docs/_build/
/src/*.egg-info/
__pycache__/
monkeytype.sqlite3
# we will probably want this committed at some point
# /migrations
*.sqlite3

View File

@ -13,7 +13,7 @@ if [[ "${1:-}" == "clean" ]]; then
rm -rf migrations/
rm -f ./src/spiff_workflow_webapp/db.sqlite3
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"

View File

@ -132,8 +132,9 @@ def tests(session: Session) -> None:
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
try:
session.env["FLASK_APP"] = "src/spiff_workflow_webapp"
session.env["FLASK_ENV"] = "testing"
session.run("flask", "upgrade")
session.run("flask", "db", "upgrade")
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
if session.interactive:

View File

@ -3,7 +3,7 @@ import os
# just for the matrix builds in CI
if os.environ.get("TEST_DATABASE_TYPE") == "sqlite":
SQLALCHEMY_DATABASE_URI = "sqlite:///db.sqlite3"
SQLALCHEMY_DATABASE_URI = "sqlite:///db_testing.sqlite3"
else:
SQLALCHEMY_DATABASE_URI = (
"mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing"

Binary file not shown.