Makefile changes so that test depends on db.sqlite3

This commit is contained in:
Imbus 2024-02-27 04:59:24 +01:00
parent 296ed987d8
commit 5be29d86af

View file

@ -29,7 +29,7 @@ clean:
rm -f db.sqlite3 rm -f db.sqlite3
# Test target # Test target
test: test: db.sqlite3
$(GOTEST) ./... -count=1 -v $(GOTEST) ./... -count=1 -v
# Get dependencies target # Get dependencies target
@ -49,5 +49,9 @@ migrate:
sqlite3 $(DB_FILE) < $$file; \ sqlite3 $(DB_FILE) < $$file; \
done done
# Target added primarily for CI/CD to ensure that the database is created before running tests
db.sqlite3:
make migrate
# Default target # Default target
default: build default: build