do not commite sqlite3 files and run correct flask db upgrade command w/ burnettk
This commit is contained in:
parent
0c1c9dcec5
commit
7e2cde1881
|
@ -8,7 +8,4 @@
|
||||||
/docs/_build/
|
/docs/_build/
|
||||||
/src/*.egg-info/
|
/src/*.egg-info/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
monkeytype.sqlite3
|
*.sqlite3
|
||||||
|
|
||||||
# we will probably want this committed at some point
|
|
||||||
# /migrations
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ if [[ "${1:-}" == "clean" ]]; then
|
||||||
|
|
||||||
rm -rf migrations/
|
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 "DROP DATABASE IF EXISTS spiff_workflow_webapp_development"
|
||||||
mysql -uroot -e "CREATE DATABASE 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 "DROP DATABASE IF EXISTS spiff_workflow_webapp_testing"
|
||||||
|
|
|
@ -132,8 +132,9 @@ def tests(session: Session) -> None:
|
||||||
session.install(".")
|
session.install(".")
|
||||||
session.install("coverage[toml]", "pytest", "pygments")
|
session.install("coverage[toml]", "pytest", "pygments")
|
||||||
try:
|
try:
|
||||||
|
session.env["FLASK_APP"] = "src/spiff_workflow_webapp"
|
||||||
session.env["FLASK_ENV"] = "testing"
|
session.env["FLASK_ENV"] = "testing"
|
||||||
session.run("flask", "upgrade")
|
session.run("flask", "db", "upgrade")
|
||||||
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
|
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
|
||||||
finally:
|
finally:
|
||||||
if session.interactive:
|
if session.interactive:
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
|
|
||||||
# just for the matrix builds in CI
|
# just for the matrix builds in CI
|
||||||
if os.environ.get("TEST_DATABASE_TYPE") == "sqlite":
|
if os.environ.get("TEST_DATABASE_TYPE") == "sqlite":
|
||||||
SQLALCHEMY_DATABASE_URI = "sqlite:///db.sqlite3"
|
SQLALCHEMY_DATABASE_URI = "sqlite:///db_testing.sqlite3"
|
||||||
else:
|
else:
|
||||||
SQLALCHEMY_DATABASE_URI = (
|
SQLALCHEMY_DATABASE_URI = (
|
||||||
"mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing"
|
"mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue