2022-04-22 12:28:01 +00:00
|
|
|
BIN = $(GOPATH)/bin
|
|
|
|
BASE = $(GOPATH)/src/$(PACKAGE)
|
|
|
|
PKGS = go list ./... | grep -v "^vendor/"
|
|
|
|
|
|
|
|
# Tools
|
|
|
|
## Testing library
|
|
|
|
GINKGO = $(BIN)/ginkgo
|
|
|
|
$(BIN)/ginkgo:
|
|
|
|
go install github.com/onsi/ginkgo/ginkgo
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: installtools
|
|
|
|
installtools: | $(GINKGO)
|
|
|
|
echo "Installing tools"
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r
|
|
|
|
|
2022-04-22 16:27:54 +00:00
|
|
|
.PHONY: integration-test-ci
|
|
|
|
integration-test-ci:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter integration \
|
|
|
|
--procs=4 --compilers=4 \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
|
|
|
--cover --coverprofile=cover.profile \
|
|
|
|
--race --trace --json-report=report.json
|
|
|
|
|
2022-05-06 15:03:15 +00:00
|
|
|
.PHONY: integration-test-ci-no-race
|
|
|
|
integration-test-ci-no-race:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter integration \
|
|
|
|
--procs=4 --compilers=4 \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
|
|
|
--cover --coverprofile=cover.profile \
|
|
|
|
--trace --json-report=report.json
|
|
|
|
|
2022-04-27 14:28:42 +00:00
|
|
|
.PHONY: integration-test-local
|
|
|
|
integration-test-local:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter integration \
|
|
|
|
--procs=4 --compilers=4 \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
2022-05-06 15:03:15 +00:00
|
|
|
--trace --race
|
|
|
|
|
|
|
|
.PHONY: integration-test-local-no-race
|
|
|
|
integration-test-local-no-race:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter integration \
|
|
|
|
--procs=4 --compilers=4 \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
|
|
|
--trace
|
2022-04-27 14:28:42 +00:00
|
|
|
|
|
|
|
.PHONY: unit-test-local
|
|
|
|
unit-test-local:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter unit \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
|
|
|
--race --trace
|
|
|
|
|
2022-04-22 16:27:54 +00:00
|
|
|
.PHONY: unit-test-ci
|
|
|
|
unit-test-ci:
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
$(GINKGO) -r --label-filter unit \
|
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
--fail-on-pending --keep-going \
|
|
|
|
--cover --coverprofile=cover.profile \
|
|
|
|
--race --trace --json-report=report.json
|
|
|
|
|
2022-04-22 12:28:01 +00:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
go fmt ./...
|
|
|
|
GO111MODULE=on go build
|
|
|
|
|
|
|
|
## Build docker image
|
|
|
|
.PHONY: docker-build
|
|
|
|
docker-build:
|
|
|
|
docker build -t vulcanize/ipld-ethcl-indexer .
|