~samwhited/xmpp

9013c0e6f765243fc78dadea7595f45b3be01c92 — Sam Whited 5 years ago e2e0b01
Add race detector to CI

Don't benchmark vendored deps
2 files changed, 12 insertions(+), 5 deletions(-)

M Makefile
M bitbucket-pipelines.yml
M Makefile => Makefile +9 -3
@@ 1,10 1,16 @@
PACKAGES=$$(go list ./... | grep -v '/vendor/')

.PHONEY: test
test:
	GO15VENDOREXPERIMENT=1 go test -cover $$(GO15VENDOREXPERIMENT=1 go list ./... | grep -v '/vendor/')
	go test -cover $(PACKAGES)

.PHONEY: bench
bench:
	go test -cover -bench . -benchmem -run 'Benchmark.*' $(PACKAGES)

deps.svg: *.go
	(   echo "digraph G {"; \
	GO15VENDOREXPERIMENT=1 go list -f '{{range .Imports}}{{printf "\t%q -> %q;\n" $$.ImportPath .}}{{end}}' \
		$$(GO15VENDOREXPERIMENT=1 go list -f '{{join .Deps " "}}' .) .; \
	go list -f '{{range .Imports}}{{printf "\t%q -> %q;\n" $$.ImportPath .}}{{end}}' \
		$$(go list -f '{{join .Deps " "}}' .) .; \
	echo "}"; \
	) | dot -Tsvg -o $@

M bitbucket-pipelines.yml => bitbucket-pipelines.yml +3 -2
@@ 6,6 6,7 @@ pipelines:
          - mkdir -p "$GOPATH/src/mellium.im/"
          - ln -s "`pwd`" "$GOPATH/src/mellium.im/xmpp"
          - cd "$GOPATH/src/mellium.im/xmpp"
          - GO15VENDOREXPERIMENT=1 go-wrapper download
          - go-wrapper download
          - go build -race
          - make test
          - GO15VENDOREXPERIMENT=1 go test -cover -bench . -benchmem -run 'Benchmark.*' ./...
          - make bench