Skip to content

Commit 6e7fd5a

Browse files
committed
add Makefile target
1 parent 24ac2af commit 6e7fd5a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,13 @@ test-postgres: test-postgres-docker
783783
-count=1
784784
.PHONY: test-postgres
785785

786+
test-migrations: test-postgres-docker
787+
echo "--- test migrations"
788+
COMMIT_FROM=$(shell git rev-parse --short HEAD)
789+
COMMIT_TO=$(shell git rev-parse --short main)
790+
DB_NAME=$(shell go run scripts/migrate-ci/main.go)
791+
go run ./scripts/migrate-test/main.go --from="$$COMMIT_FROM" --to="$$COMMIT_TO" --postgres-url="postgresql://postgres:postgres@localhost:5432/$$DB_NAME?sslmode=disable"
792+
786793
# NOTE: we set --memory to the same size as a GitHub runner.
787794
test-postgres-docker:
788795
docker rm -f test-postgres-docker || true

0 commit comments

Comments
 (0)