blob: 2281541f7f5414f677ac09d8b362dae51ea51e8e (
plain)
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
|
# The Travis setup:
# - run testsuite for every PHP version
# - run lint for every PHP version
# - run Selenium for single PHP version
language: php
php:
- "5.5"
- "5.4"
- "5.3"
- hhvm
env:
matrix:
- PHPUNIT_ARGS="--exclude-group selenium"
- LINT="yes"
global:
- secure: "D24AZRWfuIYuA42eI5Rlg+6W0U1c+X33e6XqNMDzjl7KmhIqZaplOU++mKQLcx5+uIjZ4h7oJi8jIo/gmU8wHC4q+qKbL4xKIqx1AgNDwr6Upc9IBRnlfmXiwM2uxZGn5y0LdH5xM4FzBiN3Giff9hbnIdMJKvVudKVZNlHnzr8="
- TESTSUITE_BROWSERSTACK_USER=phpMyAdmin
- TESTSUITE_USER=root
- TESTSUITE_PASSWORD=root
- TESTSUITE_SELENIUM_COVERAGE=http://127.0.0.1:8000/phpunit_coverage.php
before_script:
- mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ;
- set -e ; if [[ -z "$LINT" ]] ; then
if [[ $TRAVIS_PHP_VERSION != "hhvm" ]] ; then
git clone --depth=1 git://github.com/zenovich/runkit.git ;
cd runkit ;
phpize ;
./configure ;
make ;
make install ;
cd .. ;
phpenv config-add test/travis.php.ini ;
pear channel-discover pear.phpunit.de ;
pear install phpunit/PHPUnit_Selenium ;
composer install --dev --no-interaction ;
fi ;
if [[ ! -z "$SELENIUM" ]] ; then
php --server 127.0.0.1:8000 &
wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip ;
unzip BrowserStackLocal-linux-x64.zip ;
./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 &
mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql ;
fi ;
fi
script:
- ant locales
- set -e; if [[ -z "$LINT" ]] ; then
export TESTSUITE_URL="http://127.0.0.1:8000" ;
if [[ $TRAVIS_PHP_VERSION == "hhvm" ]] ; then
ant phpunit-hhvm ;
else
if [[ ! -z "$SELENIUM" ]] ; then
ant phpunit-nocoverage ;
else
ant phpunit ;
fi ;
fi ;
else
ant lint ;
fi
after_script:
- if [[ -f vendor/bin/coveralls ]] ; then php vendor/bin/coveralls -v ; fi
matrix:
allow_failures:
- php: hhvm
env: PHPUNIT_ARGS="--exclude-group selenium"
- php: 5.5
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
fast_finish: true
include:
- php: 5.5
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
|