Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkumatag committed Jan 8, 2021
1 parent 92c7d1d commit 2424886
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
tar -czvf pvsadm-binaries.tar.gz bin/
- name: Test
run: go test -v ./...
run: make unit

- uses: actions/upload-artifact@v2
with:
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
EXTLDFLAGS:=-w -extldflags "-static"

export PATH:=$(shell pwd)/bin:$(PATH)

path:=$(PATH)
export PATH:=./bin:$(path)
.PHONY: test
test: unit e2e

.PHONY: unit
unit:
go test $(go list ./... | grep -v /test/)

.PHONY: e2e
e2e: build
go test ./test/e2e -v

.PHONY: build
build:
CGO_ENABLED=0 go build -a -tags netgo -ldflags "$(EXTLDFLAGS)" -o bin/pvsadm .

0 comments on commit 2424886

Please sign in to comment.