feat: load and init Gitea before testing

This commit is contained in:
Aravinth Manivannan 2022-04-13 12:21:34 +05:30
parent efb5401691
commit f1ea436080
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -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