forked from gz-c/hardware-wallet-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (29 loc) · 1.23 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
39
40
41
all: build
build:
cd cmd/cli && ./install.sh
dep: vendor_proto
dep ensure
# Ensure sources for protoc-gen-go and protobuf/proto are in sync
dep ensure -add github.com/gogo/protobuf/protoc-gen-gofast
vendor_proto: proto
mkdir -p vendor/github.com/google/protobuf
cp -r -p src/device-wallet/messages/go/google/protobuf/descriptor.pb.go vendor/github.com/google/protobuf
mocks: ## Create all mock files for unit tests
echo "Generating mock files"
mockery -all -dir ./interfaces -output ./test/mocks
test_unit: mocks ## Run unit tests
go test -v github.com/skycoin/hardware-wallet-go/src/device-wallet
test_integration: ## Run integration tests
go test -v github.com/skycoin/hardware-wallet-go/test/integration
test: test_unit test_integration ## Run all tests
proto:
make -C src/device-wallet/messages build-go
clean:
make -C src/device-wallet/messages clean-go
rm -r vendor/github.com/google
lint:
golangci-lint run --no-config --deadline=3m --concurrency=2 --skip-dirs=src/device-wallet/usb test/mocks -E goimports -E golint -E varcheck -E unparam -E deadcode -E structcheck ./...
check: lint
format:
goimports -w -local github.com/skycoin/hardware-wallet-go ./cmd
goimports -w -local github.com/skycoin/hardware-wallet-go ./src