mirror of
https://github.com/dg/dibi.git
synced 2025-02-23 02:12:25 +01:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
language: php
|
|
php:
|
|
- 7.1
|
|
|
|
env:
|
|
matrix:
|
|
include:
|
|
- php: 7.1
|
|
env: coverage=on
|
|
- php: 7.1
|
|
env: codingStandard=on
|
|
|
|
allow_failures:
|
|
- php: 7.1
|
|
env: coverage=on
|
|
|
|
script:
|
|
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini $coverageArgs
|
|
- >
|
|
if [ "$codingStandard" ]; then
|
|
php temp/code-checker/src/code-checker.php --short-arrays --strict-types
|
|
&& php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.neon;
|
|
fi
|
|
|
|
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
|
|
- travis_retry composer install --no-interaction --prefer-dist
|
|
|
|
# Create databases.ini
|
|
- cp ./tests/databases.travis.ini ./tests/databases.ini
|
|
|
|
# Create Postgre database
|
|
- psql -c 'CREATE DATABASE dibi_test' -U postgres
|
|
|
|
# Install Code Checkers
|
|
- >
|
|
if [ "$codingStandard" ]; then
|
|
travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction;
|
|
travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction;
|
|
fi
|
|
- if [ "$coverage" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
|
|
|
|
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;
|
|
fi
|
|
|
|
sudo: false
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|