2021-12-02 07:58:52 +00:00
|
|
|
ROOT = "./scripts"
|
|
|
|
|
2021-12-02 10:55:51 +00:00
|
|
|
.PHONY: init_database run_docker run_test
|
2021-08-19 09:26:07 +00:00
|
|
|
|
2021-12-01 08:44:58 +00:00
|
|
|
init_database:
|
2021-12-02 10:55:51 +00:00
|
|
|
POSTGRES_PORT=5433 ${ROOT}/init_database.sh
|
2021-08-19 09:26:07 +00:00
|
|
|
|
2021-12-02 10:55:51 +00:00
|
|
|
docker_image:
|
|
|
|
source $(ROOT)/docker_env.sh && docker-compose up -d db
|
|
|
|
source $(ROOT)/docker_env.sh && docker-compose up -d backend
|
2021-12-01 15:29:16 +00:00
|
|
|
|
2021-12-02 10:55:51 +00:00
|
|
|
docker_test:
|
|
|
|
sh $(ROOT)/docker_test.sh
|
2021-08-19 09:26:07 +00:00
|
|
|
|
2021-12-02 10:55:51 +00:00
|
|
|
local_test:
|
|
|
|
# 🔥 Must run init_database first
|
|
|
|
SQLX_OFFLINE=true cargo test
|
2021-08-19 09:26:07 +00:00
|
|
|
|
|
|
|
|