feat: load and init Gitea before testing
This commit is contained in:
parent
efb5401691
commit
f1ea436080
1 changed files with 6 additions and 0 deletions
6
Makefile
6
Makefile
|
@ -1,3 +1,8 @@
|
||||||
|
define launch_test_env
|
||||||
|
docker-compose -f docker-compose-dev-deps.yml up --detach
|
||||||
|
python ./scripts/gitea.py
|
||||||
|
endef
|
||||||
|
|
||||||
define test_sqlite_db
|
define test_sqlite_db
|
||||||
cd db/db-sqlx-sqlite &&\
|
cd db/db-sqlx-sqlite &&\
|
||||||
DATABASE_URL=${SQLITE_DATABASE_URL}\
|
DATABASE_URL=${SQLITE_DATABASE_URL}\
|
||||||
|
@ -59,6 +64,7 @@ sqlx-offline-data: ## prepare sqlx offline data
|
||||||
# cargo sqlx prepare --database-url=${POSTGRES_DATABASE_URL} -- --bin starchart \
|
# cargo sqlx prepare --database-url=${POSTGRES_DATABASE_URL} -- --bin starchart \
|
||||||
--all-features
|
--all-features
|
||||||
test: migrate ## Run tests
|
test: migrate ## Run tests
|
||||||
|
$(call launch_test_env)
|
||||||
$(call test_sqlite_db)
|
$(call test_sqlite_db)
|
||||||
cargo test --no-fail-fast
|
cargo test --no-fail-fast
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue