-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (19 loc) · 549 Bytes
/
Makefile
File metadata and controls
23 lines (19 loc) · 549 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
default: test
SHELL=/usr/bin/env bash
GO=go
GOTEST=$(GO) test
GOCOVER=$(GO) tool cover
.PHONY: test
test: test/cover test/report
.PHONY: test/cover
test/cover:
$(GOTEST) -v -race -failfast -parallel 4 -cpu 4 -coverprofile main.cover.out ./...
.PHONY: test/report
test/report:
if [[ "$$HOSTNAME" =~ "codespaces-"* ]]; then \
mkdir -p /tmp/httpin_test; \
$(GOCOVER) -html=main.cover.out -o /tmp/httpin_test/coverage.html; \
sudo python -m http.server -d /tmp/httpin_test -b localhost 80; \
else \
$(GOCOVER) -html=main.cover.out; \
fi