-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
28 lines (22 loc) · 822 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
PATH := $(PWD)/.bin:$(PATH)
SHELL := /usr/bin/env bash -eu -o pipefail
CPUS ?= $(shell (nproc --all || sysctl -n hw.ncpu) 2>/dev/null || echo 1)
MAKEFLAGS += --warn-undefined-variables --output-sync=line --jobs $(CPUS)
include makefile.golangci.mk
include makefile.gotestsum.mk
.git/.hooks.log:
@git config core.hooksPath .githooks
@git config --get core.hooksPath > $@
pre-reqs += .git/.hooks.log
test: $(pre-reqs)
@gotestsum --format-hide-empty-pkg -- -race -cover -timeout=10m -shuffle=on ./...
.PHONY: test
test.failfast: $(pre-reqs)
@gotestsum --format-hide-empty-pkg --format=dots --max-fails=1 -- -timeout=10m -failfast ./...
.PHONY: test.failfast
test.mutation: $(pre-reqs)
@go test -timeout=2h -count=1 -ooze.v -tags=mutation
.PHONY: test.mutation
lint: $(pre-reqs)
@golangci-lint -v run
.PHONY: lint