Skip to content

Commit aece97d

Browse files
committed
separate tests for better diagnosis of future failures
1 parent a039062 commit aece97d

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

.travis.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
language: php
22

3+
sudo: false
4+
5+
env:
6+
- TEST_SUITE=samples
7+
- TEST_SUITE=coverage
8+
39
php:
410
- 5.6
511
- 7.0
612
- 7.1
713

8-
sudo: false
14+
before_install:
15+
# execute all of the commands which need to be executed
16+
# before installing dependencies
17+
- composer validate # make sure that our composer.json file is valid for packaging
918

10-
before_script:
19+
install:
20+
# install all of the dependencies we need here
1121
- pecl install xmldiff
1222
- composer install --prefer-dist
23+
24+
before_script:
25+
# execute all of the commands which need to be executed
26+
# before running actual tests
1327
- git submodule update --remote --recursive
1428

1529
script:
16-
- vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover
17-
- cd sample-code-php
18-
- composer install --prefer-dist
19-
- vendor/phpunit/phpunit/phpunit test-runner.php .
30+
# execute all of the tests or other commands to determine
31+
# whether the build will pass or fail
32+
- if [[ "$TEST_SUITE" == "coverage" ]]; then vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover; fi
33+
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cd sample-code-php; composer install --prefer-dist; vendor/phpunit/phpunit/phpunit test-runner.php .; fi
2034

2135
after_script:
22-
- wget https://scrutinizer-ci.com/ocular.phar
23-
# - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
36+
# - if [[ "$TEST_SUITE" == "coverage" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
37+
# - if [[ "$TEST_SUITE" == "coverage" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

0 commit comments

Comments
 (0)