From 04b2a7d4823b2c7a0dfccad3a1878f889c533868 Mon Sep 17 00:00:00 2001
From: Ethan Buchman <ethan@coinculture.info>
Date: Fri, 15 Jan 2016 14:54:17 -0500
Subject: [PATCH] run integration test

---
 circle.yml | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/circle.yml b/circle.yml
index 9700be15..5b49adeb 100644
--- a/circle.yml
+++ b/circle.yml
@@ -1,18 +1,25 @@
 machine:
+  environment:
+    GOPATH: /home/ubuntu/.go_workspace
+    REPO: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
+    INTEGRATION_TESTS_BRANCH: develop
+    INTEGRATION_TESTS_PATH: $HOME/integration-tests
+    DOCKER_VERSION: 1.8.2
+    DOCKER_MACHINE_VERSION: 0.5.4
   post:
-    - rm -rf ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
-    - mkdir -p ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
-    - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
+    - rm -rf $GOPATH/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
+    - mkdir -p $GOPATH/src/github.com/${CIRCLE_PROJECT_USERNAME}
+    - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME} $GOPATH/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
     - git config --global user.email "billings@erisindustries.com"
     - git config --global user.name "Billings the Bot"
 
 dependencies:
-  pre:
-    - sudo curl -L -o /usr/bin/docker 'http://s3-external-1.amazonaws.com/circle-downloads/docker-1.8.2-circleci'
+  override:
+    - sudo curl -L -o /usr/bin/docker http://s3-external-1.amazonaws.com/circle-downloads/docker-$DOCKER_VERSION-circleci; chmod 0755 /usr/bin/docker; true
     - sudo service docker start
     - "sudo apt-get update && sudo apt-get install -y libgmp3-dev"
-
-  override:
+    - sudo curl -sSL -o /usr/bin/docker-machine https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine_linux-amd64; sudo chmod 0755 /usr/bin/docker-machine
+    - git clone https://github.com/eris-ltd/integration-tests $INTEGRATION_TESTS_PATH
     - "cd ./cmd/erisdb && go get -d && go build"
     - "mv ~/eris-db/cmd/erisdb/erisdb ~/bin"
     - chmod +x ~/bin/erisdb
@@ -20,6 +27,7 @@ dependencies:
 test:
   override:
     - go test -v ./...
+    - bash $INTEGRATION_TESTS_PATH/test.sh
 
 deployment:
   master:
-- 
GitLab