-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (42 loc) · 1.4 KB
/
Makefile
File metadata and controls
56 lines (42 loc) · 1.4 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
BINARY := conf
MAIN := ./cmd/conf
GO := go
GOFLAGS :=
.PHONY: build install test test-unit test-e2e ci-ubuntu release-check coverage-check fmt fmt-check lint clean
## build: compile the conf binary
build:
$(GO) build $(GOFLAGS) -o $(BINARY) $(MAIN)
## install: install the binary to $GOPATH/bin
install:
$(GO) install $(MAIN)
## test: run the default local test suite
test: test-unit
## test-unit: run all non-E2E tests
test-unit:
$(GO) test ./...
## coverage-check: enforce package coverage minimums
coverage-check:
$(GO) run ./tools/coveragecheck
## test-e2e: run all end-to-end tests (requires CONF_E2E_DOMAIN, CONF_E2E_EMAIL, CONF_E2E_API_TOKEN, CONF_E2E_PRIMARY_SPACE_KEY, CONF_E2E_SECONDARY_SPACE_KEY)
test-e2e: build
$(GO) test -timeout 20m -v -tags=e2e ./cmd -run '^TestWorkflow_'
## ci-ubuntu: run the GitHub Actions ubuntu test job inside Docker
ci-ubuntu:
docker build -f docker/ubuntu-ci.Dockerfile -t conf-ci-ubuntu .
docker run --rm conf-ci-ubuntu
## release-check: run the release gate, including live sandbox E2E coverage
release-check: fmt-check lint test-unit test-e2e
## fmt: format all Go source files
fmt:
$(GO) fmt ./...
## fmt-check: fail if go files are unformatted
fmt-check:
$(GO) run ./tools/gofmtcheck
## lint: run the same static checks used in CI
lint:
$(GO) vet ./...
golangci-lint run
## clean: remove build artifacts
clean:
$(GO) clean
$(GO) clean -cache