forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
145 lines (131 loc) · 4.46 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
language: php
# TODO To use `sudo: false` you have to use `precise` until this issue is fixed:
# https://github.com/travis-ci/travis-ci/issues/5837
dist: precise
sudo: false
# dist: trusty
# sudo: required
php:
- 5.5
- 5.6
- 7.0
- 7.1
matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: nightly
git:
depth: 1
cache:
apt: true
ccache: true
timeout: 691200
directories:
- .temp
# Use ZEPHIR_PARSER_VERSION here
- $HOME/zephir-parser-v1.0.3
- $HOME/beanstalk
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/pear
services:
# Use only for `trusty`
# - beanstalkd
- mongodb
- memcached
- redis-server
- postgresql
# Not needed on `precise`
# start: Job is already running: mysql
# - mysql
env:
global:
- TEST_BT_HOST="127.0.0.1"
- TEST_BT_PORT="11300"
- TEST_MC_HOST="127.0.0.1"
- TEST_MC_PORT="11211"
- TEST_MC_WEIGHT="1"
- TEST_DB_SQLITE_NAME="/tmp/phalcon_test.sqlite"
- TEST_DB_MYSQL_HOST="127.0.0.1"
- TEST_DB_MYSQL_PORT="3306"
- TEST_DB_MYSQL_USER="root"
- TEST_DB_MYSQL_PASSWD=""
- TEST_DB_MYSQL_NAME="phalcon_test"
- TEST_DB_MYSQL_CHARSET="utf8"
- TEST_DB_POSTGRESQL_HOST="127.0.0.1"
- TEST_DB_POSTGRESQL_PORT="5432"
- TEST_DB_POSTGRESQL_USER="postgres"
- TEST_DB_POSTGRESQL_PASSWD=""
- TEST_DB_POSTGRESQL_NAME="phalcon_test"
- TEST_DB_MYSQL_DSN="mysql:host=127.0.0.1;dbname=phalcon_test"
- TEST_DB_MONGO_HOST="127.0.0.1"
- TEST_DB_MONGO_PORT="27017"
- TEST_DB_MONGO_USER="admin"
- TEST_DB_MONGO_PASSWD=""
- TEST_DB_MONGO_NAME="phalcon_test"
- TEST_RS_HOST="127.0.0.1"
- TEST_RS_PORT="6379"
- TEST_RS_DB="0"
- TEST_CACHE_DIR="tests/_cache/"
- CC="ccache gcc"
- PATH="$PATH:~/bin"
- BEANSTALKD_VERSION="1.10"
- ZEPHIR_PARSER_VERSION="v1.0.3"
# Uncomment for debug
#- ZEND_DONT_UNLOAD_MODULES=1
before_install:
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1)"
- bash tests/_ci/pear_setup.sh
- bash tests/_ci/setup_dbs.sh
install:
- travis_retry composer install --quiet --no-interaction --no-ansi --no-progress --optimize-autoloader --dev --prefer-dist --no-suggest --ignore-platform-reqs
- bash tests/_ci/install_prereqs_$PHP_MAJOR.sh
- bash tests/_ci/install_zephir_parser.sh
- bash tests/_ci/install_zephir.sh
# Use only for `precise`
- bash tests/_ci/install_beanstalkd.sh
- zephir generate
- (export PRE_PHP_INCLUDES=`php-config --includes`; cd ext/; for file in `find kernel -name "*.h"`; do $CC "$file" -I. $PRE_PHP_INCLUDES -o "$file.ghc"; done)
- (cd ext; export CFLAGS="-g3 -O1 -std=gnu90 -Wall"; $(phpenv which phpize) &> /dev/null && ./configure --silent --with-php-config=$(phpenv which php-config) --enable-phalcon &> /dev/null && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && make --silent install)
# Uncomment for debug
# - (cd ext; export CFLAGS="-g3 -O0 -std=gnu90 -Wall"; $(phpenv which phpize) &> /dev/null && ./configure --silent --with-php-config=$(phpenv which php-config) --enable-phalcon &> /dev/null && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && make --silent install)
- phpenv config-add tests/_ci/phalcon.ini
- phpenv config-add tests/_ci/ci.ini
- beanstalkd -l ${TEST_BT_HOST} -p ${TEST_BT_PORT} & # start queue listener
before_script:
# Uncomment for debug
# - ulimit -c unlimited -S || true
# - echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern &> /dev/null
script:
- vendor/bin/phpcs
- vendor/bin/phpunit --bootstrap tests/_ci/phpunit.php --debug unit-tests/
- vendor/bin/codecept build
- vendor/bin/codecept run -v -n tests/integration/
- vendor/bin/codecept run -v -n tests/unit/
# Legacy tests
- phpenv config-rm xdebug.ini
- if [[ "$PHP_MAJOR" == 5 ]]; then vendor/bin/codecept run -v -n tests/unit5x/; fi;
# Uncomment for debug
# after_failure:
# - bash tests/_ci/after_failure.sh
notifications:
email:
recipients:
- build@phalconphp.com
on_success: change
on_failure: always
addons:
apt:
packages:
- re2c
# Use only for `trusty`
# - beanstalkd
# Uncomment for debug
# - gdb
# Uncomment for `trusty`
# - mysql-server-5.6
# - mysql-server-core-5.6
# - mysql-client-5.6