mirror of
https://github.com/simple-login/app.git
synced 2025-10-18 11:16:21 +08:00
* feat: use rye as project manager * chore: change poetry to rye for scripts * ci: avoid duplicate executions * Remove unused check and rename check * removed unused parallel tasks * Remove strategy altogether --------- Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
19 lines
469 B
Bash
Executable file
19 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
|