diff --git a/.gitignore b/.gitignore index 23800a4513c6a9b7043c8be68d3364bf4ece0693..a9585c463a0946b6dc795c105afb491bf2c939a9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ signing_key* http.log .idea .DS_Store +coverage.txt diff --git a/.travis.yml b/.travis.yml index 5b4aaa34270568df13b0935dd81c81f03766f455..50ddc920c92033bbab378f7ee5e56e32515e2b09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,12 @@ services: - mysql env: - - MYSQL_TEST="true" + - SUITE=lint + - SUITE=test go: - 1.11.x - 1.10.x - - 1.9.x - tip matrix: @@ -25,4 +25,7 @@ install: sudo: false script: - - make test + - MYSQL_TEST="true" make $SUITE + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 1d2f08ee1f2ae49527887cb5bb40f1daecfa2dd3..46b006446961f2f2cf67793f78c7dc02def45146 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,11 @@ CGO_ENABLED ?= $(shell go env CGO_ENABLED) all: test build -test: dep - go test ./... +test: + go test -coverprofile=coverage.txt -covermode=count ./... go install -race $(CASHIER_CMD) $(CASHIERD_CMD) + +lint: dep go vet ./... go list ./... |xargs -L1 golint -set_exit_status gofmt -s -d -l -e $(SRC_FILES) @@ -39,7 +41,6 @@ migration: dep: go get -u golang.org/x/lint/golint - go get -u golang.org/x/tools/cmd/goimports version: @echo $(VERSION) diff --git a/README.md b/README.md index 9507f3ad8a7fca1cf2480009896829b67eb77a25..ad02d90ca3075db786f69e9120b1c4e69e3c44fb 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,10 @@ docker run -it --rm -p 10000:10000 --name cashier -v ${PWD}:/cashier nsheridan/c # Requirements ## Server -Go 1.9 or 1.10, though it may work with earlier versions. +Go 1.10 or 1.11, though it may work with earlier versions. ## Client -- Go 1.9 or 1.10 or later, though it may work with earlier versions. +- Go 1.10 or 1.11 or later, though it may work with earlier versions. - OpenSSH 5.6 or newer. - A working SSH agent (note that the GPG agent does not handle certificates)