-
Notifications
You must be signed in to change notification settings - Fork 893
/
.travis.yml
93 lines (76 loc) · 2.27 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
90
91
92
93
language: php
dist: xenial
services:
- postgresql
- mysql
php:
- 7.4
env:
global:
- CODECOVERAGE=1
matrix:
- PGSQL_DSN='pgsql://postgres@127.0.0.1/phinx'
- MYSQL_DSN='mysql://root@127.0.0.1/phinx' MYSQL_UNIX_SOCKET='/var/run/mysqld/mysqld.sock'
- SQLITE_DSN='sqlite:///phinx'
matrix:
include:
- php: 7.2
env: PREFER_LOWEST=1 CODECOVERAGE=0
- php: nightly
env: SQLITE_DSN='sqlite:///phinx' CODECOVERAGE=0
allow_failures:
- php: nightly
fast_finish: true
before_install:
- if [[ $MYSQL_DSN ]]; then mysql -e 'create database phinx;'; fi
- if [[ $PGSQL_DSN ]]; then psql -c 'create database phinx;' -U postgres; fi
- if [[ $PGSQL_DSN ]]; then psql -c 'create extension if not exists citext;' -U postgres; fi
- |
if [[ $CODECOVERAGE == 1 ]]; then
pecl channel-update pecl.php.net
pecl install pcov
fi
- phpenv config-rm xdebug.ini
install:
- |
if [[ $PREFER_LOWEST == 1 ]]; then
composer update --no-interaction --prefer-stable
elif [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then
composer install --no-interaction --ignore-platform-reqs
else
composer update --no-interaction --prefer-stable --prefer-lowest
fi
script:
- |
if [[ $CODECOVERAGE == 1 ]]; then
vendor/bin/phpunit --verbose --coverage-clover=clover.xml
else
vendor/bin/phpunit --verbose
fi
after_success:
- |
if [[ $CODECOVERAGE == 1 ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar
./php-coveralls.phar
fi
cache:
directories:
- $HOME/.composer/cache
notifications:
email: false
before_deploy:
# have to move symfony/yaml from devDependency to dependency so box packs it
- composer require symfony/yaml
- composer global require humbug/box:^3.8
- ~/.composer/vendor/bin/box compile
deploy:
provider: releases
api_key:
secure: bi+/Jfvxodb2WibSUaSSLMxQnK9wndJIw7N76/M7wAw04en1yJZQnJyaEYrklAtHPCBUaS7x691Ta4O0jN4hFkxs2vPgrXenS9Dzi436095Ga6tEAmTdDbHdmvXzDGDTaH9AbDzq5gGBF+xu4IBzDVO0pvDkzI+I5vJGbJXRws8=
file: phinx.phar
on:
repo: cakephp/phinx
tags: true
php: 7.2
condition: $DEFAULT = 1 && $PREFER_LOWEST != 1