Browse Source

Merge pull request #9862 from gyuho/travis

tests: switch between Travis and Semaphore
Gyuho Lee 7 years ago
parent
commit
55a05d9615
2 changed files with 20 additions and 21 deletions
  1. 16 0
      .travis.yml
  2. 4 21
      tests/semaphore.test.bash

+ 16 - 0
.travis.yml

@@ -22,12 +22,18 @@ env:
   - TARGET=linux-amd64-functional
   - TARGET=linux-amd64-unit
   - TARGET=all-build
+  - TARGET=linux-amd64-grpcproxy
+  - TARGET=linux-amd64-coverage
   - TARGET=linux-amd64-fmt-unit-go-tip
   - TARGET=linux-386-unit
 
 matrix:
   fast_finish: true
   allow_failures:
+  - go: 1.10.3
+    env: TARGET=linux-amd64-grpcproxy
+  - go: 1.10.3
+    env: TARGET=linux-amd64-coverage
   - go: tip
     env: TARGET=linux-amd64-fmt-unit-go-tip
   - go: 1.10.3
@@ -47,6 +53,10 @@ matrix:
     env: TARGET=linux-amd64-unit
   - go: tip
     env: TARGET=all-build
+  - go: tip
+    env: TARGET=linux-amd64-grpcproxy
+  - go: tip
+    env: TARGET=linux-amd64-coverage
   - go: 1.10.3
     env: TARGET=linux-amd64-fmt-unit-go-tip
   - go: tip
@@ -103,6 +113,12 @@ script:
             && GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build \
             && GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build"
         ;;
+      linux-amd64-grpcproxy)
+        sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test
+        ;;
+      linux-amd64-coverage)
+        sudo HOST_TMP_DIR=/tmp make docker-test-coverage
+        ;;
       linux-amd64-fmt-unit-go-tip)
         GOARCH=amd64 PASSES='fmt unit' ./test
         ;;

+ 4 - 21
tests/semaphore.test.bash

@@ -7,28 +7,11 @@ fi
 
 <<COMMENT
 # amd64-e2e
-bash tests/semaphore.test.bash
+tests/semaphore.test.bash
+sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.7" make docker-test
 
 # 386-e2e
-TEST_ARCH=386 bash tests/semaphore.test.bash
-
-# grpc-proxy
-TEST_OPTS="PASSES='build grpcproxy'" bash tests/semaphore.test.bash
-
-# coverage
-TEST_OPTS="coverage" bash tests/semaphore.test.bash
+sudo HOST_TMP_DIR=/tmp TEST_OPTS="GOARCH=386 PASSES='build e2e'" make docker-test
 COMMENT
 
-if [ -z "${TEST_OPTS}" ]; then
-	TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.7"
-fi
-if [ "${TEST_ARCH}" == "386" ]; then
-  TEST_OPTS="GOARCH=386 PASSES='build e2e'"
-fi
-
-echo "Running tests with" ${TEST_OPTS}
-if [ "${TEST_OPTS}" == "coverage" ]; then
-  sudo HOST_TMP_DIR=/tmp make docker-test-coverage
-else
-  sudo HOST_TMP_DIR=/tmp TEST_OPTS="${TEST_OPTS}" make docker-test
-fi
+sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.7" make docker-test