forked from aquasecurity/fanal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (26 loc) · 786 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
33
34
GOPATH=$(shell go env GOPATH)
GOBIN=$(GOPATH)/bin
.PHONY: deps
deps:
go get -d
.PHONY: test
test:
go test ./...
.PHONY: lint
lint: devel-deps
go vet ./...
golint -set_exit_status
.PHONY: cover
cover: devel-deps
goveralls
$(GOBIN)/crane:
go install github.com/google/go-containerregistry/cmd/crane@v0.9.0
test/integration/testdata/fixtures/*.tar.gz: $(GOBIN)/crane
mkdir -p test/integration/testdata/fixtures/
test/integration/scripts/download-images.sh
.PHONY: test-integration
test-integration: test/integration/testdata/fixtures/*.tar.gz
go test -v -tags="integration" ./test/integration/...
.PHONY: test-performance
test-performance: test/integration/testdata/fixtures/*.tar.gz
go test -v -benchtime=10x -run=^$$ -tags="performance" -bench=. ./test/integration/...