Skip to content

Commit fd50405

Browse files
authored
ensures travis tests fail immediately (GoogleCloudPlatform#376)
1 parent 8f80e31 commit fd50405

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.travis.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,7 @@ before_script:
4444
- pecl install grpc
4545

4646
script:
47-
- # only run on PHP 5.6
48-
if [ "${RUN_CS_FIXER}" = "true" ]; then
49-
testing/run_cs_check.sh;
50-
fi
51-
- testing/run_test_suite.sh;
52-
- # only run for travis crons
53-
if [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then
54-
testing/run_dependency_check.sh;
55-
fi
47+
- testing/run_all_tests.sh
5648

5749
after_success:
5850
- composer require "satooshi/php-coveralls:^1.0"

testing/run_all_tests.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Copyright 2016 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -ex
17+
18+
# only run when explicitly set
19+
if [ "${RUN_CS_FIXER}" = "true" ]; then
20+
testing/run_cs_check.sh;
21+
fi
22+
testing/run_test_suite.sh;
23+
# only run for travis crons
24+
if [ "${TRAVIS_EVENT_TYPE}" != "pull_request" ]; then
25+
testing/run_dependency_check.sh;
26+
fi

0 commit comments

Comments
 (0)