forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (78 loc) · 2.49 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
90
91
92
93
94
95
96
97
# 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.6"
- "5.5"
- "5.4"
- "5.3"
- hhvm
sudo: false
env:
matrix:
- PHPUNIT_ARGS="--exclude-group selenium"
- LINT="yes"
global:
- secure: "TR3s7lHkREN706g+FeNXl1S0R2fpcI1H+n8USIkl5WBd7S2/NpsZlSfkrgnC7/xRBDXzHwuYd8JQQyAZyrqPEeLqIqlKzxIcTHOiJWGeR/YO7JXsr1Slt/nFqygpIyz8yOh3QIvX6FMzPsamBlUNhRvTAkd2wXPMBpXQlhTVmX8="
- TESTSUITE_BROWSERSTACK_USER=phpMyAdmin
- TESTSUITE_USER=root
- TESTSUITE_PASSWORD=root
before_script:
- export PATH=~/.composer/vendor/bin/:$PATH
- mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ;
- set -e ; if [[ -z "$LINT" ]] ; then
composer install --dev --no-interaction ;
if [[ $TRAVIS_PHP_VERSION != "hhvm" ]] ; then
git clone --depth=1 git://github.com/zenovich/runkit.git ;
cd runkit ;
if [[ $TRAVIS_PHP_VERSION = "5.6" ]] ; then
wget https://github.com/zenovich/runkit/pull/71.diff ;
patch -p1 < 71.diff ;
fi ;
phpize ;
./configure ;
make ;
make install ;
cd .. ;
phpenv config-add test/travis.php.ini ;
wget https://scrutinizer-ci.com/ocular.phar ;
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 build/logs/clover.xml ]] ; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi
- if [[ -f vendor/bin/coveralls ]] ; then php vendor/bin/coveralls -v || true ; fi
matrix:
allow_failures:
- php: 5.5
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
- php: hhvm
env: PHPUNIT_ARGS="--exclude-group selenium"
fast_finish: true
include:
- php: 5.5
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"