forked from phalcon/phalcon-devtools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
72 lines (62 loc) · 2.44 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
language: php
sudo: required
services:
- postgresql
- mysql
matrix:
include:
- php: '5.5'
env: PHALCON_VERSION="v3.4.1"
dist: trusty
- php: '5.6'
- php: '7.0'
env: ZEND_BACKEND="--backend=ZendEngine3"
- php: '7.1'
env: ZEND_BACKEND="--backend=ZendEngine3"
- php: '7.2'
env: ZEND_BACKEND="--backend=ZendEngine3"
- php: '7.3'
env: ZEND_BACKEND="--backend=ZendEngine3"
git:
depth: 1
cache:
ccache: true
timeout: 691200
directories:
- .temp
- vendor
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/cphalcon/$PHALCON_VERSION
- $HOME/ext/$PHALCON_VERSION
env:
global:
- PATH="$PATH:~/bin"
- DISPLAY=":99.0"
- PHALCON_VERSION="v3.4.4"
before_install:
- export PHP_VERSION=$(php-config --version)
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1)"
- export PHP_EXTENSION_DIR=$(php-config --extension-dir)
- source $TRAVIS_BUILD_DIR/tests/_ci/environment
- export $(cut -d= -f1 $TRAVIS_BUILD_DIR/tests/_ci/environment)
- phpenv config-rm xdebug.ini || true
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com $GH_TOKEN; fi;
- if [ ! -f "$HOME/cphalcon/$PHALCON_VERSION/tests/_ci/phalcon.ini" ]; then git clone -q --branch $PHALCON_VERSION --depth=1 https://github.com/phalcon/cphalcon.git $HOME/cphalcon/$PHALCON_VERSION >/dev/null 2>&1; fi;
- bash tests/_ci/setup_dbs.sh
install:
- if [ ! -f $HOME/ext/$PHALCON_VERSION/$PHP_VERSION/phalcon.so ]; then cd $HOME/cphalcon/$PHALCON_VERSION/build && bash ./install --phpize $(phpenv which phpize) --php-config $(phpenv which php-config) && mkdir -p $HOME/ext/$PHP_VERSION && cp $PHP_EXTENSION_DIR/phalcon.so $HOME/ext/$PHP_VERSION/phalcon.so; fi;
- if [ -f $HOME/ext/$PHALCON_VERSION/$PHP_VERSION/phalcon.so ]; then cp $HOME/ext/$PHALCON_VERSION/$PHP_VERSION/phalcon.so $PHP_EXTENSION_DIR/phalcon.so; fi;
- phpenv config-add $HOME/cphalcon/$PHALCON_VERSION/tests/_ci/phalcon.ini
- cd $TRAVIS_BUILD_DIR
- travis_retry composer install --prefer-dist --no-interaction
- if [ "$PHP_MAJOR" == "7" ]; then composer require --dev phpstan/phpstan:^0.9; fi;
before_script:
- ln -s $PWD/phalcon ~/bin/phalcon
script:
- vendor/bin/phpcs
- vendor/bin/codecept build
- vendor/bin/codecept run unit -v
- vendor/bin/codecept run functional -v
- vendor/bin/codecept run console -v
- '[[ "$PHP_MAJOR" == "5" ]] || vendor/bin/phpstan analyse -l 5 -c phpstan.neon scripts -v'