diff --git a/.travis.yml b/.travis.yml index e5afa3b6..406b8626 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ go: - "1.10.x" env: global: + - PATH=${PATH}:./bin - POP_PATH=$PWD/cmd/proxy - GO_ENV=test_postgres - MINIO_ACCESS_KEY=minio @@ -19,11 +20,12 @@ script: - golint -set_exit_status $(go list ./... | grep -v '/mocks') # Linter - go test -race -coverprofile cover.out -covermode atomic ./... # Run all the tests with the race detector and code coverage enabled before_script: + - mkdir bin - GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/ - go get github.com/golang/lint/golint - wget "https://dl.minio.io/server/minio/release/linux-amd64/minio" - chmod +x minio && nohup ./minio server . & - - go get -u -v github.com/gobuffalo/buffalo/buffalo + - ./scripts/get_buffalo.sh - go get -u -v golang.org/x/vgo - buffalo db create - buffalo db migrate up diff --git a/scripts/get_buffalo.sh b/scripts/get_buffalo.sh new file mode 100755 index 00000000..b8d1e410 --- /dev/null +++ b/scripts/get_buffalo.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +TAR_GZ="buffalo_0.12.3_linux_amd64.tar.gz" +BUFFALO_URL="https://github.com/gobuffalo/buffalo/releases/download/v0.12.3/${TAR_GZ}" +BUFFALO_TARGET_BIN="./bin/buffalo" + +curl -L -o ${TAR_GZ} ${BUFFALO_URL} +tar -xvf ${TAR_GZ} +mv buffalo-no-sqlite ${BUFFALO_TARGET_BIN} +chmod +x ${BUFFALO_TARGET_BIN}