-
-
Notifications
You must be signed in to change notification settings - Fork 339
/
.travis.yml
89 lines (75 loc) · 2.28 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
# Phalcon Framework
#
# Copyright (c) 2011-2018 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
sudo: false
dist: trusty
php:
- 5.6
- 7.0
- 7.1
- 7.2
services:
- redis-server
- mongodb
- beanstalkd
git:
depth: 1
cache:
apt: true
ccache: true
timeout: 604800
directories:
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/pear
- $HOME/.local/lib
env:
global:
- CC="ccache gcc"
- PHALCON_VERSION=v3.4.0
addons:
apt:
packages:
- beanstalkd
hosts:
- db
- incubator.local
before_install:
- phpenv config-rm xdebug.ini || true
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com $GH_TOKEN; fi;
- export PHP_MAJOR="$(`phpenv which php` -r 'echo phpversion();' | cut -d '.' -f 1)"
- bash tests/_ci/pear_setup.sh
- bash tests/_ci/install_prereqs_$PHP_MAJOR.sh
install:
- bash $TRAVIS_BUILD_DIR/tests/_ci/install_phalcon.sh
- cd $TRAVIS_BUILD_DIR
- travis_retry composer install --prefer-dist --no-interaction --no-ansi --no-progress --optimize-autoloader --dev --no-suggest
- phpenv config-add $TRAVIS_BUILD_DIR/tests/_ci/ci.ini
- ls -al `$(phpenv which php-config) --extension-dir`
- $(phpenv which php) -v
- $(phpenv which php) -m
before_script:
# 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
script:
- vendor/bin/phpcs
- vendor/bin/codecept build
- vendor/bin/codecept run -v tests/unit
- '[[ "$PHP_MAJOR" == "7" ]] || vendor/bin/codecept run -v tests/unit5x'
after_failure:
- for file in `ls ./tests/_output`; do [ -f ./tests/_output/$file ] && cat ./tests/_output/$file; done;
notifications:
email:
on_success: never
on_failure: never