File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ matrix:
27
27
- php : 7.1
28
28
env : WITH_LOWEST=true
29
29
- php : 7.1
30
- env : WITH_HIGHEST=true
30
+ env : WITH_HIGHEST=true WITH_COVERAGE=true
31
31
32
32
cache :
33
33
directories :
34
34
- $HOME/.composer/cache
35
35
36
36
before_install :
37
- - source .travis/xdebug .sh
37
+ - source .travis/travis .sh
38
38
- xdebug-disable
39
39
- composer self-update
40
40
- composer validate
@@ -47,9 +47,7 @@ before_script:
47
47
- git config --global user.name "Travis CI"
48
48
49
49
script :
50
- - xdebug-enable
51
- - vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
52
- - xdebug-disable
50
+ - run-tests
53
51
54
52
after_success :
55
- - php composer/bin/test-reporter
53
+ - if [[ "$WITH_COVERAGE" == "true" ]]; then php composer/bin/test-reporter; fi
Original file line number Diff line number Diff line change @@ -20,3 +20,13 @@ function xdebug-enable() {
20
20
mv " $config .bak" $config
21
21
fi
22
22
}
23
+
24
+ function run-tests() {
25
+ if [[ " $WITH_COVERAGE " == " true" ]]; then
26
+ xdebug-enable
27
+ vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
28
+ xdebug-disable
29
+ else
30
+ vendor/bin/phpunit
31
+ fi
32
+ }
You can’t perform that action at this time.
0 commit comments