-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
38 lines (26 loc) · 1.03 KB
/
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
29
30
31
32
33
34
35
36
37
38
TEST_COUNT ?= 10
COVERAGE_FILE ?= coverage.out
# Detect the system architecture
ARCH := $(shell uname -m)
build: ensure_go_version
go build -v ./...
generate: ensure_go_version clean-generate generate-mocks
generate-mocks: ensure_go_version
go install github.com/vektra/mockery/[email protected]
mockery
clean-generate: ensure_go_version
rm -rf ./mocks/
test:
go test -race -fullpath -shuffle on -count $(TEST_COUNT) -coverprofile=$(COVERAGE_FILE) \
`go list ./... | grep -Ev 'chainlink-ccip/internal/mocks|chainlink-ccip/mocks'`
lint: ensure_go_version ensure_golangcilint_1_62_2
golangci-lint run -c .golangci.yml
lint-fix: ensure_go_version ensure_golangcilint_1_62_2
golangci-lint run -c .golangci.yml --fix
checks: test lint
install-golangcilint:
go install github.com/golangci/golangci-lint/cmd/[email protected]
ensure_go_version:
@go version | grep -q 'go1.23' || (echo "Please use go1.23" && exit 1)
ensure_golangcilint_1_62_2:
@golangci-lint --version | grep -q '1.62.2' || (echo "Please use golangci-lint 1.62.2" && exit 1)