forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
82 lines (70 loc) · 2.51 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
# 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')" ;
- 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
ln -s ~/.phpenv/versions/$(phpenv version-name)/pear/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php . ;
echo auto_prepend_file = ~/.phpenv/versions/$(phpenv version-name)/pear/PHPUnit/Extensions/SeleniumCommon/prepend.php >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
echo auto_append_file = ~/.phpenv/versions/$(phpenv version-name)/pear/PHPUnit/Extensions/SeleniumCommon/append.php >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
php --server 127.0.0.1:8000 &
wget http://www.browserstack.com/BrowserStackTunnel.jar ;
java -jar BrowserStackTunnel.jar -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
- if [[ -z "$LINT" ]] ; then
export TESTSUITE_URL="http://127.0.0.1:8000" ;
if [[ $TRAVIS_PHP_VERSION == "hhvm" ]] ; then
ant phpunit-hhvm ;
else
ant phpunit ;
fi ;
else
ant lint ;
fi
after_script:
- php vendor/bin/coveralls -v
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"