Run go run in travis
@@ -26,14 +26,17 @@ before_script:
- sudo apt-get -qq -y update
- sudo apt-get -qq -y install jq
script:
- # Running Weaviate deamon
- - sudo docker-compose up -d
+ # Running Cassandra deamon
+ - docker run -it --name weaviate_db_1_travis -e CASSANDRA_BROADCAST_ADDRESS=127.0.0.1 -p 7000:7000 -p 9042:9042 -v ~/cassandra:/var/lib/cassandra -d cassandra:3
+ - sleep 26
+ # Running Weaviate as deamon
+ - nohup go run ./cmd/weaviate-server/main.go --scheme=http --port=80 --host=localhost --config="cassandra" --config-file="./weaviate.conf.json"
# Sleep to make sure all is up and running
- - sleep 20
+ - sleep 26
# Find the correct ip, key and token
- - WEAVAITEIP=$(sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' weaviate_weaviate_1)
- - ROOTTOKEN=$(sudo docker-compose logs weaviate|grep -s ROOTTOKEN|sed 's/.*ROOTTOKEN=//')
- - ROOTKEY=$(sudo docker-compose logs weaviate|grep -s ROOTKEY|sed 's/.*ROOTKEY=//')
+ - WEAVAITEIP=$(sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' weaviate_db_1_travis)
+ - ROOTTOKEN=$(cat nohup.out | grep -s ROOTTOKEN|sed 's/.*ROOTTOKEN=//')
+ - ROOTKEY=$(cat nohup.out | grep -s ROOTKEY|sed 's/.*ROOTKEY=//')
# Run the tests
- |
# On error, quit
