File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed
Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 2020 go-version-file : " go.mod"
2121
2222 - name : Run tests
23- run : make ci- test
23+ run : make test
2424
2525 - name : Run Trivy vulnerability scanner in repo mode
2626 uses : aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0
Original file line number Diff line number Diff line change @@ -3,35 +3,24 @@ VERSION := v0.6.0
33COMMIT := $(shell git rev-parse HEAD)
44DATE := $(shell date "+% Y-% m-% dT% H:% M:% S% z")
55
6- SRCS := $(shell find . -type f -name '* .go')
76LDFLAGS := -ldflags="-s -w -X \"github.com/dtan4/k8sec/version.version=$(VERSION ) \" -X \"github.com/dtan4/k8sec/version.commit=$(COMMIT ) \" -X \"github.com/dtan4/k8sec/version.date=$(DATE ) \" -extldflags -static"
8- NOVENDOR := $(shell go list ./... | grep -v vendor)
97
10- export GO111MODULE =on
8+ .DEFAULT_GOAL := build
119
12- .DEFAULT_GOAL := bin/$(NAME )
13-
14- bin/$(NAME ) : $(SRCS )
10+ .PHONY : build
11+ build :
1512 go build $(LDFLAGS ) -o bin/$(NAME )
1613
17- .PHONY : ci-test
18- ci-test :
19- go test -coverpkg=./... -coverprofile=coverage.txt -v ./...
20-
2114.PHONY : clean
2215clean :
2316 rm -rf bin/*
2417 rm -rf dist/*
2518 rm -rf vendor/*
2619
27- .PHONY : fast
28- fast :
29- go build $(LDFLAGS ) -o bin/$(NAME )
30-
3120.PHONY : install
3221install :
3322 go install $(LDFLAGS )
3423
3524.PHONY : test
3625test :
37- go test -cover -v $( NOVENDOR )
26+ go test -cover -race ./...
You can’t perform that action at this time.
0 commit comments