Using gvm & shell test file to manage circleci go environment

This commit is contained in:
Cameron Sparr
2015-08-06 12:26:02 -06:00
parent 85c61fb684
commit 5dd14f2ee2
2 changed files with 62 additions and 22 deletions

View File

@@ -1,24 +1,11 @@
dependencies:
post:
# install golint
- go get github.com/golang/lint/golint
# install binaries
- go install ./...
machine:
pre:
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
- source $HOME/.gvm/scripts/gvm; gvm install go1.4.2 --binary
dependencies:
override:
- echo "Dummy override, so no Circle dependencies execute"
test:
pre:
# Vet go code for any potential errors
- go vet ./...
# Verify that all files are properly go formatted
- "[ `git ls-files | grep '.go$' | xargs gofmt -l 2>&1 | wc -l` -eq 0 ]"
# Only docker-compose up kafka, the other services are already running
# see: https://circleci.com/docs/environment#databases
# - docker-compose up -d kafka
override:
# Enforce that testutil, cmd, and main directory are fully linted
- golint .
- golint testutil/...
- golint cmd/...
# Run short unit tests
- make test-short
# TODO run full unit test suite
override:
- bash circle-test.sh