Skip to content

Commit 07907b3

Browse files
authored
Merge pull request #145 from moufmouf/adding_php_7.3_tests
Enabling PHP 7.3 tests again
2 parents 13c58d2 + bc465cc commit 07907b3

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

.travis.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ cache:
77
matrix:
88
include:
99
- php: 7.2
10-
env: PREFER_LOWEST="" DB=mysql
10+
env: PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1
11+
- php: 7.3
12+
env: PREFER_LOWEST="" DB=mysql NO_WEAKREF=1
1113
- php: 7.1
1214
env: PREFER_LOWEST="" DB=mysql COVERALLS=true
1315
- php: 7.1
@@ -52,9 +54,6 @@ matrix:
5254
env: PREFER_LOWEST="" DB=oracle PHPUNITFILE="-c phpunit.oracle.xml"
5355
- php: 7.1
5456
env: PREFER_LOWEST="--prefer-lowest" DB=oracle PHPUNITFILE="-c phpunit.oracle.xml"
55-
# 7.3 allowed to fail due to an issue with greenlion/PHP-SQL-Parser: https://github.com/greenlion/PHP-SQL-Parser/pull/304
56-
- php: 7.3
57-
env: PREFER_LOWEST="" DB=mysql NO_WEAKREF=1
5857
env:
5958
global:
6059
- GIT_NAME: "'Couscous auto deploy'"
@@ -69,17 +68,28 @@ before_script:
6968
script:
7069
# Let's run the Oracle script only when the password is available (it is not available in forks unfortunately)
7170
- |
71+
if [[ "$COVERALLS" != "true" ]] ; then export NO_COVERAGE="--no-coverage"; fi;
7272
if [ "$DB" == "oracle" ] ; then
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;
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;
7474
elif [ "$DB" == "mysql8" ] ; then
7575
sudo /etc/init.d/mysql stop;
7676
tests/phpunit-mysql8.sh
7777
else
78-
./vendor/bin/phpunit $PHPUNITFILE;
78+
echo ./vendor/bin/phpunit $PHPUNITFILE $NO_COVERAGE;
79+
./vendor/bin/phpunit $PHPUNITFILE $NO_COVERAGE;
80+
fi
81+
- |
82+
if [ "$RUN_CSCHECK" == "1" ] ; then
83+
composer cscheck
84+
fi
85+
- |
86+
if [ "$RUN_PHPSTAN" == "1" ] ; then
87+
composer phpstan
88+
fi
89+
- |
90+
if [ "$RUN_REQUIRECHECKER" == "1" ] ; then
91+
composer require-checker
7992
fi
80-
- composer cscheck
81-
- composer phpstan
82-
- composer require-checker
8393
after_script:
8494
- if [ "$COVERALLS" = "true" ] ; then ./vendor/bin/php-coveralls -v; fi
8595
- if [ "$COVERALLS" = "true" ] ; then vendor/bin/couscous travis-auto-deploy --php-version=7.1 -vvv; fi

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"beberlei/porpaginas": "~1.0",
2828
"mouf/classname-mapper": "~1.0",
2929
"doctrine/cache": "^1.6",
30-
"greenlion/php-sql-parser": "^4.1.2",
30+
"greenlion/php-sql-parser": "^4.3.0",
3131
"phlib/logger": "^3.0.1",
3232
"symfony/console": "^2 || ^3 || ^4",
3333
"mouf/utils.log.psr.multi-logger": "^1.0",

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)