-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 729 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (31 loc) · 729 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
COVERAGE_OUT = coverage.out
TEST_TARGET = ./internal/...
.PHONY: dev
dev:
go tool air
.PHONY: build
build:
go build -o ./build/certbot ./cmd
.PHONY: format
format:
goimports -w .
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: test-unit
test-unit:
go test $(TEST_TARGET)
.PHONY: test-integration
test-integration:
go test -tags=integration $(TEST_TARGET)
.PHONY: test-e2e
test-e2e:
go test -tags=ie2e $(TEST_TARGET)
.PHONY: test
test:
@echo "Running tests..."
@go test -coverprofile=$(COVERAGE_OUT) -tags=integration,e2e $(TEST_TARGET)
@grep -v "testutil/" coverage.out > coverage.clean.out
@mv coverage.clean.out coverage.out
@go tool cover -html=coverage.out
@echo "Coverage written to $(COVERAGE_OUT)"