forked from phalcon/incubator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (89 loc) · 2.88 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
# Phalcon Framework
#
# Copyright (c) 2011-2017 Phalcon Team (https://www.phalconphp.com)
#
# This source file is subject to the New BSD License that is bundled
# with this package in the file LICENSE.txt.
#
# If you did not receive a copy of the license and are unable to
# obtain it through the world-wide-web, please send an email
# to license@phalconphp.com so we can send you a copy immediately.
language: php
dist: trusty
sudo: required
php:
- 5.5
- 5.6
- 7.0
services:
- memcached
- redis
- mongodb
- mysql
git:
depth: 1
cache:
apt: true
ccache: true
timeout: 691200
directories:
- vendor
- $HOME/.composer/cache
env:
global:
- PATH="$PATH:~/bin"
- PHALCON_VERSION="v3.1.1"
before_install:
- phpenv config-rm xdebug.ini || true
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/phpize /usr/bin/
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/php-config /usr/bin/
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1,2)"
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
- travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs
install:
- ( bash tests/_ci/install_prereqs_$PHP_MAJOR.sh )
# See https://github.com/aerospike/aerospike-client-php/issues/127
- '[[ "${PHP_MAJOR:0:1}" == "7" ]] || bash ${TRAVIS_BUILD_DIR}/tests/_ci/install_aerospike.sh'
- git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b ${PHALCON_VERSION} >/dev/null 2>&1
- (cd cphalcon/build; bash ./install --phpize $(phpenv which phpize) --php-config $(phpenv which php-config))
- phpenv config-add ${TRAVIS_BUILD_DIR}/tests/_ci/redis.ini
- phpenv config-add ${TRAVIS_BUILD_DIR}/tests/_ci/phalcon.ini
# Debug
- php -m
- pecl list
before_script:
- stty cols 160
# Create database and user
- echo 'CREATE DATABASE incubator CHARSET=utf8 COLLATE=utf8_unicode_ci' | mysql -u root
- echo "CREATE USER 'incubator'@'%' IDENTIFIED BY 'secret'" | mysql -u root
- echo "GRANT ALL PRIVILEGES ON incubator.* TO 'incubator'@'%' WITH GRANT OPTION" | mysql -u root
- cat ${TRAVIS_BUILD_DIR}/tests/_data/dump.sql | mysql -u root incubator
# See https://github.com/aerospike/aerospike-client-php/issues/127
- '[[ "${PHP_MAJOR:0:1}" == "7" ]] || bash ${TRAVIS_BUILD_DIR}/tests/_ci/install_aserver.sh'
script:
- vendor/bin/phpcs
- vendor/bin/codecept build
- vendor/bin/codecept run -v
notifications:
email:
recipients:
- build@phalconphp.com
on_success: change
on_failure: always
addons:
apt:
packages:
- re2c
- beanstalkd
- python-bcrypt
- build-essential
- autoconf
- libssl-dev
- libyaml-dev
- liblua5.1-dev
- mysql-server-5.6
- mysql-server-core-5.6
- mysql-client-5.6
hosts:
- db
- incubator.local