Explorar o código

Use sudo: false in travis for great good

Chris Bannister %!s(int64=10) %!d(string=hai) anos
pai
achega
73de91035a
Modificáronse 2 ficheiros con 12 adicións e 13 borrados
  1. 8 10
      .travis.yml
  2. 4 3
      integration.sh

+ 8 - 10
.travis.yml

@@ -1,35 +1,33 @@
 language: go
 
+sudo: false
+
 matrix:
   fast_finish: true
 
 env:
-  - CASS=1.2.19
-  - CASS=2.0.12
-  - CASS=2.1.2
+- CASS=1.2.19
+- CASS=2.0.12
+- CASS=2.1.2
 
 go:
   - 1.3
   - 1.4
 
-before_install:
-  - sudo apt-get update
-
 install:
-  - sudo apt-get install -y libjna-java python-pip
-  - sudo pip install cql PyYAML six
+  - pip install --user cql PyYAML six
   - go get golang.org/x/tools/cmd/vet
   - go get golang.org/x/tools/cmd/cover
   - git clone https://github.com/pcmanus/ccm.git
   - pushd ccm
-  - sudo ./setup.py install
+  - ./setup.py install --user
   - popd
   - go get .
 
 script:
   - set -e
   - go test -v -tags unit
-  - bash -x integration.sh $CASS
+  - PATH=$PATH:$HOME/.local/bin bash -x integration.sh $CASS
   - go vet .
 
 notifications:

+ 4 - 3
integration.sh

@@ -7,7 +7,7 @@ function run_tests() {
 	local version=$1
 
 	ccm create test -v binary:$version -n $clusterSize -d --vnodes
-	
+
 	sed -i '/#MAX_HEAP_SIZE/c\MAX_HEAP_SIZE="256M"' ~/.ccm/repository/$version/conf/cassandra-env.sh
 	sed -i '/#HEAP_NEWSIZE/c\HEAP_NEWSIZE="100M"' ~/.ccm/repository/$version/conf/cassandra-env.sh
 
@@ -15,7 +15,7 @@ function run_tests() {
 	ccm start -v
 	ccm status
 	ccm node1 nodetool status
-	
+
 	local proto=2
 	if [[ $version == 1.2.* ]]; then
 		proto=1
@@ -25,7 +25,7 @@ function run_tests() {
 
 	go test -timeout 5m -tags integration -cover -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... | tee results.txt
 
-	if [ ${PIPESTATUS[0]} -ne 0 ]; then 
+	if [ ${PIPESTATUS[0]} -ne 0 ]; then
 		echo "--- FAIL: ccm status follows:"
 		ccm status
 		ccm node1 nodetool status
@@ -43,4 +43,5 @@ function run_tests() {
 	fi
 	ccm clear
 }
+
 run_tests $1