Commit 79bbc525 authored by Janos Guljas's avatar Janos Guljas

add Makefile

parent 4f17e337
......@@ -41,16 +41,14 @@ jobs:
run: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
working-directory: ~
- name: GolangCI-Lint
run: golangci-lint run
- name: Lint
run: make lint
- name: Vet
run: go vet -v ./...
run: make vet
- name: Build
env:
CGO_ENABLED: 0
run: go build -ldflags "-s -w" ./...
run: make build
- name: Test
run: go test -v -race ./...
run: make test
GO ?= go
GOLANGCI_LINT ?= golangci-lint
.PHONY: lint
lint:
$(GOLANGCI_LINT) run
.PHONY: vet
vet:
$(GO) vet ./...
.PHONY: test
test:
$(GO) test -v -race ./...
.PHONY: build
build: export CGO_ENABLED=0
build:
$(GO) build -trimpath -ldflags "-s -w" ./...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment