Skip to content

Commit 93f9812

Browse files
committed
Disabling recurrent running for phpstan, csfixer and requirechecker + removing code coverage for tests not uploaded to coveralls
1 parent 5263878 commit 93f9812

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.travis.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ cache:
66
- $HOME/.composer/cache
77
matrix:
88
include:
9+
- php: 7.2
10+
env: PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1
911
- php: 7.3
1012
env: PREFER_LOWEST="" DB=mysql NO_WEAKREF=1
11-
- php: 7.2
12-
env: PREFER_LOWEST="" DB=mysql
1313
- php: 7.1
1414
env: PREFER_LOWEST="" DB=mysql COVERALLS=true
1515
- php: 7.1
@@ -67,18 +67,28 @@ before_script:
6767
- if [ -z "$NO_WEAKREF" ] ; then pecl install weakref-beta; fi
6868
script:
6969
# Let's run the Oracle script only when the password is available (it is not available in forks unfortunately)
70+
- if [ "$COVERALLS" -ne "true" ] ; export NO_COVERAGE="--no-coverage"; fi;
7071
- |
7172
if [ "$DB" == "oracle" ] ; then
72-
docker run -v $(pwd):/app -v $(pwd)/tests/Fixtures/oracle-startup.sql:/docker-entrypoint-initdb.d/oracle-startup.sql moufmouf/oracle-xe-php vendor/bin/phpunit $PHPUNITFILE;
73+
docker run -v $(pwd):/app -v $(pwd)/tests/Fixtures/oracle-startup.sql:/docker-entrypoint-initdb.d/oracle-startup.sql moufmouf/oracle-xe-php vendor/bin/phpunit $PHPUNITFILE $NO_COVERAGE;
7374
elif [ "$DB" == "mysql8" ] ; then
7475
sudo /etc/init.d/mysql stop;
7576
tests/phpunit-mysql8.sh
7677
else
77-
./vendor/bin/phpunit $PHPUNITFILE;
78+
./vendor/bin/phpunit $PHPUNITFILE $NO_COVERAGE;
79+
fi
80+
- |
81+
if [ "$RUN_CSCHECK" == "1" ] ; then
82+
composer cscheck
83+
fi
84+
- |
85+
if [ "$RUN_PHPSTAN" == "1" ] ; then
86+
composer phpstan
87+
fi
88+
- |
89+
if [ "$RUN_REQUIRECHECKER" == "1" ] ; then
90+
composer require-checker
7891
fi
79-
- composer cscheck
80-
- composer phpstan
81-
- composer require-checker
8292
after_script:
8393
- if [ "$COVERALLS" = "true" ] ; then ./vendor/bin/coveralls -v; fi
8494
- if [ "$COVERALLS" = "true" ] ; then vendor/bin/couscous travis-auto-deploy --php-version=7.1 -vvv; fi

tests/phpunit-mysql8.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ docker run --rm --name mysql8-tdbm-test -p 3306:3306 -p 33060:33060 -e MYSQL_ROO
1111
# Let's wait for MySQL 8 to start
1212
sleep 20
1313

14-
vendor/bin/phpunit -c phpunit.mysql8.xml
14+
vendor/bin/phpunit -c phpunit.mysql8.xml $NO_COVERAGE
1515
RESULT_CODE=$?
1616

1717
docker stop mysql8-tdbm-test

0 commit comments

Comments
 (0)