-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
37 lines (29 loc) · 1.15 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
before_script:
# Update Composer
- travis_retry composer self-update
# Install Nette Tester
- travis_retry composer install --no-interaction --prefer-source
# Setup database
- mysql -e 'CREATE DATABASE yetorm_test;'
# Coveralls
- travis_retry [ ! -e "./tests/php.ini" ] && touch ./tests/php.ini
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then cat ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini >> ./tests/php.ini; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then NTESTER_FLAGS="--coverage ./coverage.xml --coverage-src ./src"; else TESTER_FLAGS=""; fi
script:
- vendor/bin/tester tests -s -p php -c tests/php.ini $NTESTER_FLAGS
after_script:
# Coveralls
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then composer require satooshi/php-coveralls; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then php vendor/bin/coveralls -c tests/.coveralls.yml -v; fi
after_failure:
# Print *.actual content
- 'for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'
cache:
directories:
- $HOME/.composer/cache