Merge remote-tracking branch 'origin/master'
[phpmyadmin.git] / .travis.yml
blobdf37ae332d70c6e91745bc42a20d19601b3cf620
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   - "7.0"
10   - "5.6"
11   - "5.5"
12   - "5.4"
13   - "5.3"
14   - hhvm
15   - nightly
17 sudo: false
19 env:
20   matrix:
21     - PHPUNIT_ARGS="--exclude-group selenium"
22   global:
23     - TESTSUITE_USER=root
24     - TESTSUITE_PASSWORD=root
25     - TESTSUITE_URL=http://127.0.0.1:8000
27 before_script:
28   - export PATH=~/.composer/vendor/bin/:$PATH
29   - mysql -uroot -e "CREATE DATABASE test"
30   - mysql -uroot < sql/create_tables.sql
31   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
32   - composer install --dev --no-interaction
33   - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi
34   - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi
35   - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi
36   - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi
38 script:
39   - ant clean
40   - ant locales
41   - if [ -z "$SELENIUM" ] ; then ant lint ; fi
42   - set -e;
43     if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then
44     ant phpunit-hhvm ;
45     else
46     if [ ! -z "$SELENIUM" ] ; then
47     ant phpunit-nocoverage ;
48     else
49     ant phpunit ;
50     fi ;
51     fi
53 after_script:
54   - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
55   - if [ -f php.log ] ; then cat php.log ; fi
57 matrix:
58   allow_failures:
59     - php: 5.6
60       env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
61     - php: hhvm
62       env: PHPUNIT_ARGS="--exclude-group selenium"
63     - php: nightly
64       env: PHPUNIT_ARGS="--exclude-group selenium"
65     - php: "7.0"
66       env: PHPUNIT_ARGS="--exclude-group selenium"
67   fast_finish: true
68   include:
69     - php: 5.6
70       env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
71 cache:
72   directories:
73     - $HOME/.composer/cache/
74     - $HOME/browserstack
75     - $HOME/runkit
76 # trigger Buildtime Trend Service to parse Travis CI log
77 notifications:
78   webhooks:
79     - https://buildtimetrend.herokuapp.com/travis