2012-10-18 23:00:12 +02:00
|
|
|
language: php
|
|
|
|
php:
|
|
|
|
- 5.4
|
|
|
|
- 5.5
|
2014-03-24 19:16:07 +01:00
|
|
|
- 5.6
|
2015-06-13 10:37:45 +02:00
|
|
|
- 7.0
|
2016-07-20 15:54:58 +02:00
|
|
|
- 7.1
|
2012-10-18 23:00:12 +02:00
|
|
|
|
2015-01-10 19:11:30 +01:00
|
|
|
script:
|
2016-04-21 11:29:10 +02:00
|
|
|
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini $COVERAGE
|
2015-10-06 01:39:01 +02:00
|
|
|
- php temp/code-checker/src/code-checker.php --short-arrays
|
2014-05-13 02:47:35 +02:00
|
|
|
|
|
|
|
after_failure:
|
|
|
|
# Print *.actual content
|
|
|
|
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
|
2012-10-18 23:00:12 +02:00
|
|
|
|
|
|
|
before_script:
|
2015-01-10 19:11:30 +01:00
|
|
|
# Install Nette Tester & Code Checker
|
2015-07-23 18:54:25 +02:00
|
|
|
- travis_retry composer install --no-interaction
|
2015-10-06 01:39:01 +02:00
|
|
|
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction
|
2016-04-21 11:29:10 +02:00
|
|
|
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then COVERAGE="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
|
2015-01-10 19:11:30 +01:00
|
|
|
|
|
|
|
# Create databases.ini
|
2015-11-04 17:21:02 +01:00
|
|
|
- cp ./tests/databases.travis.ini ./tests/databases.ini
|
2015-01-10 19:11:30 +01:00
|
|
|
|
|
|
|
# Create Postgre database
|
|
|
|
- psql -c 'CREATE DATABASE dibi_test' -U postgres
|
2015-07-23 18:54:25 +02:00
|
|
|
|
2016-04-21 11:29:10 +02:00
|
|
|
after_script:
|
|
|
|
# Report Code Coverage
|
|
|
|
- >
|
|
|
|
if [ "$COVERAGE" != "" ]; then
|
|
|
|
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
|
|
|
|
&& php coveralls.phar --verbose --config tests/.coveralls.yml
|
|
|
|
|| true; fi
|
|
|
|
|
2015-07-23 18:54:25 +02:00
|
|
|
sudo: false
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache
|