-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
51 lines (37 loc) · 1.3 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
install:
dep ensure
unit: format
@(go list ./... | grep -v "vendor/" | xargs -n1 go test -race -cover)
unit-bench:
./scripts/unit-travis.sh
coverage:
go test github.com/aldor007/mort/... -race -coverprofile=coverage.txt -covermode=atomic
integrations:
npm install
./scripts/run-tests.sh
format:
@(go fmt ./...)
@(go vet ./...)
tests: unit integrations
docker-push:
docker buildx build --platform linux/amd64,linux/arm64 -t aldor007/mort -f Dockerfile . -t aldor007/mort:latest --push; docker push aldor007/mort:latest
run-server:
mkdir -p /tmp/mort
go run cmd/mort/mort.go -config configuration/config.yml
run-test-server:
scripts/prepare-for-tests.sh
go run cmd/mort/mort.go -config ./tests-int/mort.yml
run-test-server-redis:
scripts/prepare-for-tests.sh
go run cmd/mort/mort.go -config ./tests-int/mort-redis.yml
clean-prof:
find . -name ".test" -depth -exec rm {} \;
find . -name ".cpu" -depth -exec rm {} \;
find . -name ".mem" -depth -exec rm {} \;
release:
docker build . -f Dockerfile.build --build-arg GITHUB_TOKEN=${GITHUB_TOKEN}
docker-tests:
scripts/prepare-for-tests.sh
docker-compose up --build
base-docker-push:
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/aldor007/mort-base:1.2.0-8.11.2 -f Dockerfile.base . -t ghcr.io/aldor007/mort-base:latest --push