forked from nextras/orm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (38 loc) · 1.65 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
38
39
40
41
42
43
44
45
46
47
48
49
language: php
php:
- 7.0
- 7.1
- 7.2
matrix:
fast_finish: true
sudo: false
cache:
directories:
- $HOME/.composer/cache
- vendor
before_script:
# Create php.ini & sections.ini
- cp ./tests/config.array.sample.neon ./tests/config.array.neon && cp ./tests/config.pgsql.sample.neon ./tests/config.pgsql.neon && cp ./tests/config.mysql.sample.neon ./tests/config.mysql.neon
- cp ./tests/php-unix.ini ./tests/php.ini
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then NTESTER_FLAGS="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; else TESTER_FLAGS=""; fi
- cp ./tests/sections.sample.ini ./tests/sections.ini
# Create MySQL & Postgre database
- psql -c 'CREATE DATABASE nextras_orm_test' -U postgres
- mysql -e 'CREATE DATABASE nextras_orm_test;'
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
# Install Nette Tester
- phpenv config-rm xdebug.ini || true
- travis_retry composer update --no-interaction --prefer-source
script:
- ./tests/run.sh -s $NTESTER_FLAGS ./tests/cases
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then vendor/bin/phpstan.phar analyse -l 7 -c .phpstan.neon src; fi
after_script:
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; 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
after_failure:
# Print *.actual content & log content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
- for i in $(find tests -name \*.log); do echo "--- $i"; cat $i; echo; echo; done