Skip to content
Snippets Groups Projects
Commit 13054312 authored by Kevin Lyda's avatar Kevin Lyda :speech_balloon: Committed by Niall Sheridan
Browse files

Move tests out of travis config to a standalone script

Can also be used as a pre-commit hook.
parent fe53f90b
Branches
Tags
No related merge requests found
......@@ -26,8 +26,4 @@ before_script:
sudo: false
script:
- go install -v ./cmd/cashier ./cmd/cashierd
- go list ./... |grep -v vendor/ |xargs go test
- gofmt -d $(find -type f -name '*.go' -not -path './vendor/*')
- go list ./... |grep -v vendor/ |xargs go vet
- go list ./... |grep -v vendor/ |xargs -L1 golint -set_exit_status
- ./run_tests.sh
#! /bin/sh
# This can be used as a pre-commit script. Just run
# cp run_tests.sh .git/hooks/pre-commit
# and it will run before each commit.
set -xue
go install -v ./cmd/cashier ./cmd/cashierd
go list ./... |grep -v vendor/ |xargs go test
gofmt -d $(find * -type f -name '*.go' -not -path 'vendor/*')
go list ./... |grep -v vendor/ |xargs go vet
if ! type -f golint > /dev/null; then
go get -u github.com/golang/lint/golint
fi
go list ./... |grep -v vendor/ |xargs -L1 golint -set_exit_status
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment