forked from cakephp/cakephp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
89 lines (71 loc) · 2.34 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
language: php
dist: xenial
services:
- memcached
- redis-server
- postgresql
- mysql
addons:
postgresql: '9.6'
cache:
directories:
- $HOME/.composer/cache
php:
- 7.4
env:
matrix:
- DB=mysql DB_URL='mysql://[email protected]/cakephp_test?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
- DB=pgsql DB_URL='postgres://[email protected]/cakephp_test'
- DB=sqlite DB_URL='sqlite:///:memory:'
matrix:
include:
- php: 7.2
env: PREFER_LOWEST=1
- php: nightly
env: DB=sqlite DB_URL='sqlite:///:memory:'
allow_failures:
- php: nightly
fast_finish: true
before_install:
- echo cakephp version && tail -1 VERSION.txt
- if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
- |
if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then
pecl channel-update pecl.php.net
pecl install pcov
fi
- |
if [[ $TRAVIS_PHP_VERSION != 'nightly' ]]; then
phpenv config-rm xdebug.ini
echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
- sudo locale-gen da_DK.UTF-8
install:
- |
if [[ $PREFER_LOWEST == 1 ]]; then
composer update --prefer-lowest --prefer-stable --no-interaction
elif [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then
composer install --no-interaction --ignore-platform-reqs
else
composer install --no-interaction
fi
script:
- |
if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml
else
vendor/bin/phpunit
fi
after_success:
- |
if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar
chmod +x php-coveralls.phar
./php-coveralls.phar
fi
notifications:
email: false