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

add Makefile

parent 4f17e337
...@@ -41,16 +41,14 @@ jobs: ...@@ -41,16 +41,14 @@ jobs:
run: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint run: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
working-directory: ~ working-directory: ~
- name: GolangCI-Lint - name: Lint
run: golangci-lint run run: make lint
- name: Vet - name: Vet
run: go vet -v ./... run: make vet
- name: Build - name: Build
env: run: make build
CGO_ENABLED: 0
run: go build -ldflags "-s -w" ./...
- name: Test - 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