forked from pressly/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (28 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: dist
dist:
@mkdir -p ./bin
@rm -f ./bin/*
GOOS=darwin GOARCH=amd64 go build -o ./bin/goose-darwin64 ./cmd/goose
GOOS=linux GOARCH=amd64 go build -o ./bin/goose-linux64 ./cmd/goose
GOOS=linux GOARCH=386 go build -o ./bin/goose-linux386 ./cmd/goose
GOOS=windows GOARCH=amd64 go build -o ./bin/goose-windows64.exe ./cmd/goose
GOOS=windows GOARCH=386 go build -o ./bin/goose-windows386.exe ./cmd/goose
test-packages:
go test -v $$(go list ./... | grep -v -e /tests -e /bin -e /cmd -e /examples)
test-e2e: test-e2e-postgres test-e2e-mysql
test-e2e-postgres:
go test -v ./tests/e2e -dialect=postgres
test-e2e-mysql:
go test -v ./tests/e2e -dialect=mysql
test-clickhouse:
go test -timeout=10m -count=1 -race -v ./tests/clickhouse -test.short
docker-cleanup:
docker stop -t=0 $$(docker ps --filter="label=goose_test" -aq)
start-postgres:
docker run --rm -d \
-e POSTGRES_USER=${GOOSE_POSTGRES_DB_USER} \
-e POSTGRES_PASSWORD=${GOOSE_POSTGRES_PASSWORD} \
-e POSTGRES_DB=${GOOSE_POSTGRES_DBNAME} \
-p ${GOOSE_POSTGRES_PORT}:5432 \
-l goose_test \
postgres:14-alpine