Makefile changes so that test depends on db.sqlite3
This commit is contained in:
parent
296ed987d8
commit
5be29d86af
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue