language: go
go:
  - 1.8
env:
  - "PATH=/home/travis/gopath/bin:$PATH"
before_install:
  - go get ./...
script:
  # RUN DATASTORE TEST
  - export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
  - echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
  - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
  - sudo apt-get update && sudo apt-get install google-cloud-sdk
  - nohup gcloud beta emulators datastore start &
  - rm nohup.out
  - nohup go run ./cmd/weaviate-server/main.go --scheme=http --port=8080 --host=127.0.0.1 &
  - sleep 12
  - WEAVIATEKEY=$(grep "ROOTKEY=" nohup.out | cut -d "=" -f 2)
  - go test -v ./test -args -api-key=$WEAVIATEKEY
language: go
go:
  - 1.8
env:
  - "PATH=/home/travis/gopath/bin:$PATH"
before_install:
  - go get ./...
script:
  # RUN DATASTORE TEST
  - export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
  - echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
  - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
  - sudo apt-get update && sudo apt-get install google-cloud-sdk
  - export DATASTORE_DATASET=weaviate-dev-001
  - export DATASTORE_EMULATOR_HOST=127.0.0.1:8081
  - export DATASTORE_EMULATOR_HOST_PATH=127.0.0.1:8081/datastore
  - export DATASTORE_HOST=http://127.0.0.1:8081
  - export DATASTORE_PROJECT_ID=weaviate-dev-001
  - nohup gcloud beta emulators datastore start &
  - rm nohup.out
  - nohup go run ./cmd/weaviate-server/main.go --scheme=http --port=8080 --host=127.0.0.1 &
  - sleep 12
  - WEAVIATEKEY=$(grep "ROOTKEY=" nohup.out | cut -d "=" -f 2)
  - go test -v ./test -args -api-key=$WEAVIATEKEY
Add settings for Travis datastore emulator.
gh-70: Add settings for Travis datastore emulator.
