simple-login/app/scripts/run-test.sh
MrMeeb 664cd32f81
All checks were successful
Build-Release-Image / Build-Image (linux/amd64) (push) Successful in 3m54s
Build-Release-Image / Build-Image (linux/arm64) (push) Successful in 23m12s
Build-Release-Image / Merge-Images (push) Successful in 46s
Build-Release-Image / Create-Release (push) Successful in 9s
Build-Release-Image / Notify (push) Successful in 3s
4.63.0
2025-01-20 12:00:06 +00:00

20 lines
469 B
Bash
Executable File

# Run tests
# Delete the test DB if it isn't properly removed
docker rm -f sl-test-db
# Create a test DB
docker run -d --name sl-test-db -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -e POSTGRES_DB=test -p 15432:5432 postgres:13
# the time for the test DB container to start
sleep 3
# migrate the DB to the latest version
CONFIG=tests/test.env rye run alembic upgrade head
# run test
rye run pytest -c pytest.ci.ini
# Delete the test DB
docker rm -f sl-test-db