Install ocular using composer instead of wget
[phpmyadmin.git] / .travis.yml
blob7125054a1b95271f72f2d14a28a2f56b75ea8e93
1 # The Travis setup:
2 # - run testsuite for every PHP version
3 # - run lint for every PHP version
4 # - run Selenium for single PHP version
6 language: php
8 php:
9   - "5.6"
10   - "5.5"
11   - "5.4"
12   - "5.3"
13   - hhvm
15 sudo: false
17 env:
18   matrix:
19     - PHPUNIT_ARGS="--exclude-group selenium"
20     - LINT="yes"
21   global:
22     - secure: "TR3s7lHkREN706g+FeNXl1S0R2fpcI1H+n8USIkl5WBd7S2/NpsZlSfkrgnC7/xRBDXzHwuYd8JQQyAZyrqPEeLqIqlKzxIcTHOiJWGeR/YO7JXsr1Slt/nFqygpIyz8yOh3QIvX6FMzPsamBlUNhRvTAkd2wXPMBpXQlhTVmX8="
23     - TESTSUITE_BROWSERSTACK_USER=phpMyAdmin
24     - TESTSUITE_USER=root
25     - TESTSUITE_PASSWORD=root
26     - TESTSUITE_URL=http://127.0.0.1:8000
28 before_script:
29   - export PATH=~/.composer/vendor/bin/:$PATH
30   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ;
31   - composer install --dev --no-interaction
32   - set -e ; if [ -z "$LINT" ] ; then
34     if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then
36     git clone --depth=1 git://github.com/zenovich/runkit.git ;
37     cd runkit ;
38     if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then
39     wget https://github.com/zenovich/runkit/pull/71.diff ; 
40     patch -p1 < 71.diff ;
41     fi ;
42     phpize ;
43     ./configure ;
44     make ;
45     make install ;
46     cd .. ;
48     phpenv config-add test/travis.php.ini ;
50     fi ;
52     if [ ! -z "$SELENIUM" ] ; then
54     php --server 127.0.0.1:8000 &
56     wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip ;
57     unzip BrowserStackLocal-linux-x64.zip ;
58     ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 &
60     mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql ;
62     fi ;
63     fi
65 script:
66   - ant locales
67   - set -e; if [ -z "$LINT" ] ; then
68     if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then
69     ant phpunit-hhvm ;
70     else
71     if [ ! -z "$SELENIUM" ] ; then
72     ant phpunit-nocoverage ;
73     else
74     ant phpunit ;
75     fi ;
76     fi ;
77     else
78     ant lint ;
79     fi
81 after_script:
82   - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi
83   - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
85 matrix:
86   allow_failures:
87     - php: 5.5
88       env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
89     - php: hhvm
90       env: PHPUNIT_ARGS="--exclude-group selenium"
91   fast_finish: true
92   include:
93     - php: 5.5
94       env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
95 cache:
96   directories:
97     - $HOME/.composer/cache/