Update travis build to exactly mimic local build (#120)

This commit is contained in:
Matt K 2018-01-03 12:42:48 -06:00 committed by GitHub
parent 4fabe3e917
commit 095cb1e7b7

View File

@ -7,19 +7,30 @@ services:
addons: addons:
postgresql: "9.6" postgresql: "9.6"
install: before_install:
# godo
- go get -u gopkg.in/godo.v2/cmd/godo
# dep
- go get -u github.com/golang/dep/cmd/dep - go get -u github.com/golang/dep/cmd/dep
- dep ensure - dep ensure
# ginkgo
- go get -u github.com/onsi/ginkgo/ginkgo - go get -u github.com/onsi/ginkgo/ginkgo
# migrate
before_script: - go get -u -d github.com/mattes/migrate/cli github.com/lib/pq
- sudo $(which go) build -tags 'postgres' -o /usr/local/bin/migrate github.com/mattes/migrate/cli
- sudo -u postgres createdb vulcanize_private
# geth
- wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.7.2-1db4ecdc.tar.gz - wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.7.2-1db4ecdc.tar.gz
- tar -xzf geth-linux-amd64-1.7.2-1db4ecdc.tar.gz - tar -xzf geth-linux-amd64-1.7.2-1db4ecdc.tar.gz
- sudo cp geth-linux-amd64-1.7.2-1db4ecdc/geth /usr/local/bin - sudo cp geth-linux-amd64-1.7.2-1db4ecdc/geth /usr/local/bin
install:
- dep ensure
before_script:
- ./scripts/setup - ./scripts/setup
- nohup ./scripts/start_private_blockchain </dev/null & - nohup ./scripts/start_private_blockchain </dev/null &
- createdb vulcanize_private - godo migrate -- -e private
- psql vulcanize_private < db/schema.sql
script: script:
- ginkgo -r - ginkgo -r