Makefile: add target richtest (#1865)
Don't require contributors to install richgo but keep it as an option and for CI
This commit is contained in:
parent
c6b9971923
commit
6200c8e551
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -88,7 +88,7 @@ jobs:
|
|||||||
go install github.com/kyoh86/richgo"${_version}"
|
go install github.com/kyoh86/richgo"${_version}"
|
||||||
go install github.com/mitchellh/gox"${_version}"
|
go install github.com/mitchellh/gox"${_version}"
|
||||||
|
|
||||||
- run: RICHGO_FORCE_COLOR=1 PATH=$HOME/go/bin/:$PATH make test
|
- run: RICHGO_FORCE_COLOR=1 PATH=$HOME/go/bin/:$PATH make richtest
|
||||||
|
|
||||||
|
|
||||||
test-win:
|
test-win:
|
||||||
@ -125,4 +125,4 @@ jobs:
|
|||||||
go install github.com/kyoh86/richgo@latest
|
go install github.com/kyoh86/richgo@latest
|
||||||
go install github.com/mitchellh/gox@latest
|
go install github.com/mitchellh/gox@latest
|
||||||
|
|
||||||
- run: RICHGO_FORCE_COLOR=1 PATH=$HOME/go/bin:$PATH make test
|
- run: RICHGO_FORCE_COLOR=1 PATH=$HOME/go/bin:$PATH make richtest
|
||||||
|
8
Makefile
8
Makefile
@ -5,10 +5,6 @@ ifeq (, $(shell which golangci-lint))
|
|||||||
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (, $(shell which richgo))
|
|
||||||
$(warning "could not find richgo in $(PATH), run: go install github.com/kyoh86/richgo@latest")
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: fmt lint test install_deps clean
|
.PHONY: fmt lint test install_deps clean
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
@ -25,6 +21,10 @@ lint:
|
|||||||
|
|
||||||
test: install_deps
|
test: install_deps
|
||||||
$(info ******************** running tests ********************)
|
$(info ******************** running tests ********************)
|
||||||
|
go test -v ./...
|
||||||
|
|
||||||
|
richtest: install_deps
|
||||||
|
$(info ******************** running tests with kyoh86/richgo ********************)
|
||||||
richgo test -v ./...
|
richgo test -v ./...
|
||||||
|
|
||||||
install_deps:
|
install_deps:
|
||||||
|
Loading…
Reference in New Issue
Block a user