github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/Makefile (about)

     1  .PHONY: all test
     2  
     3  all: build
     4  
     5  proto:
     6  	@./buildall.sh
     7  
     8  build:
     9  	@go build ./...
    10  
    11  
    12  # {{{ test
    13  
    14  PACKAGES := $(shell go list ./... | grep -v "/examples/" | grep -v "/persistence" | grep -v "/scheduler")
    15  
    16  
    17  
    18  
    19  test:
    20  	@go test $(PACKAGES) -timeout=30s
    21  
    22  test2:
    23  	@go install gotest.tools/gotestsum@latest
    24  	@gotestsum --format testname $(PACKAGES)
    25  
    26  test-short:
    27  	@go test $(PACKAGES) -timeout=30s -short
    28  
    29  test-race:
    30  	@go test $(PACKAGES) -timeout=30s -race
    31  
    32  lint:
    33  	@go install github.com/mgechev/revive@latest
    34  	@revive -formatter friendly $(PACKAGES)
    35  
    36  vet:
    37  	@go vet $(PACKAGES)
    38  
    39  bench:
    40  	@go test $(PACKAGES) -bench=.
    41  
    42  # }}} test
    43  
    44  # {{{ benchmark
    45  
    46  packages_benchmark := $(shell go list ./... | grep -v "/log")
    47  
    48  benchmark:
    49  	go test -benchmem -run=^$ $(packages_benchmark) -bench ^Benchmark$(t).*$
    50  # }}}
    51  
    52  # {{{ docker-env
    53  root_dir := $(abspath $(CURDIR)/)
    54  docker-env:
    55  	sudo docker run -it --rm \
    56  		-v $(root_dir)/:/go/src/AsncronIT/protoactor-go \
    57  		-w /go/src/AsncronIT/protoactor-go \
    58  		-e GOPATH=/go \
    59  		--entrypoint /bin/bash \
    60  		cupen/protoc:3.9.1-1
    61  # }}}