-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (44 loc) · 1.74 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
language: php
php:
- 5.5
- 5.6
- 7.0
#- hhvm
#- hhvm-nightly
matrix:
allow_failures:
- php: 7.0
- php: hhvm-nightly
sudo: false
cache:
directories:
- vendor
- $HOME/.composer/cache
env:
- PHALCON_VERSION="2.0.7"
before_script:
# Update Composer
- travis_retry composer self-update
# Install Phalcon
- git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b phalcon-v${PHALCON_VERSION}
- (cd cphalcon/ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall"; phpize &> /dev/null && ./configure --silent --enable-phalcon &> /dev/null && make --silent -j4 > /dev/null && make --silent install && phpenv config-add ../unit-tests/ci/phalcon.ini &> /dev/null)
- php -r 'echo \Phalcon\Version::get()."\n";'
# Install Nette Tester
- travis_retry composer install --no-interaction --prefer-source
# Coveralls
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then cat ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini >> ./tests/php-unix.ini; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then NTESTER_FLAGS="--coverage ./coverage.xml --coverage-src ./src"; else TESTER_FLAGS=""; fi
script:
# Print phpmodule
- php -m
# Print info
- vendor/bin/tester tests/cases -i -c tests/php-unix.ini
# Run tests
- vendor/bin/tester tests/cases -s -c tests/php-unix.ini $NTESTER_FLAGS
after_script:
# Coveralls
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then composer require satooshi/php-coveralls; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then php vendor/bin/coveralls -c tests/.coveralls.yml -v; fi
after_failure:
# Print *.actual content
- 'for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'