-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
32 lines (23 loc) · 804 Bytes
/
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
VERSION=`cat VERSION.txt`
clean:
rm -rf coverage.txt
rm -rf integration-coverage.txt
compose-up:
docker-compose up -d
integration:
SSL_MODE=disable go test -v -tags=integration ./pkg/dba/...
docker-image:
docker build --pull -t jonstacks/pg-dba:$(VERSION) \
-t jonstacks/pg-dba:latest \
--build-arg PG_DBA_VERSION=$(VERSION) .
# Run the unit and integration tests and combine them.
test: unit-tests integration-tests
gocovmerge coverage.txt integration-coverage.txt > coverage.txt
unit-tests:
go test -v -coverprofile=coverage.txt -covermode=atomic ./...
integration-tests:
SSL_MODE=disable go test -v -tags=integration -coverprofile=integration-coverage.txt -covermode=atomic ./...
doc-server:
$(MAKE) -C docs doc-server
kill-doc-server:
$(MAKE) -C docs kill-doc-server