mirror of
https://github.com/dg/dibi.git
synced 2025-02-23 10:26:21 +01:00
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
language: php
|
|
php:
|
|
- 5.4
|
|
- 5.5
|
|
- 5.6
|
|
- 7.0
|
|
- 7.1
|
|
|
|
script:
|
|
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini $COVERAGE
|
|
- php temp/code-checker/src/code-checker.php --short-arrays
|
|
|
|
after_failure:
|
|
# Print *.actual content
|
|
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
|
|
|
|
before_script:
|
|
# Install Nette Tester & Code Checker
|
|
- travis_retry composer install --no-interaction
|
|
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction
|
|
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then COVERAGE="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
|
|
|
|
# Create databases.ini
|
|
- cp ./tests/databases.travis.ini ./tests/databases.ini
|
|
|
|
# Create Postgre database
|
|
- psql -c 'CREATE DATABASE dibi_test' -U postgres
|
|
|
|
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
|
|
|
|
sudo: false
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|