forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (116 loc) · 3.69 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
language: php
dist: trusty
sudo: false
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
- $HOME/beanstalk
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/pear
- $HOME/.local/lib
services:
- beanstalkd
- mongodb
- redis-server
- postgresql
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.1.0"
# 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 --dev --prefer-source --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
- 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)
# Use -O0 for debug purposes
- (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)
- phpenv config-add tests/_ci/phalcon.ini
- phpenv config-add tests/_ci/ci.ini
- ls -al `$(phpenv which php-config) --extension-dir`
- php -m
before_script:
# Uncomment for debug
# - ulimit -c unlimited -S || true
# - echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern &> /dev/null
# attempt to workaroung "ptrace: Operation not permitted"
# - sudo chmod +s $(which gdb)
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. Only PHP 5
- 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
- beanstalkd
# Uncomment for debug
# - gdb