Translated using Weblate (Italian)
[phpmyadmin.git] / .travis.yml
blobc3d29e007f58a756bfba0f75ffe060115ad3beab
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
14   - nightly
16 sudo: false
18 env:
19   matrix:
20     - PHPUNIT_ARGS="--exclude-group selenium"
21   global:
22     - TESTSUITE_USER=root
23     - TESTSUITE_PASSWORD=root
24     - TESTSUITE_URL=http://127.0.0.1:8000
26 before_script:
27   - export PATH=~/.composer/vendor/bin/:$PATH
28   - mysql -uroot -e "CREATE DATABASE test"
29   - mysql -uroot < sql/create_tables.sql
30   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
31   - composer install --dev --no-interaction
32   - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi
33   - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi
34   - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi
35   - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi
37 script:
38   - ant clean
39   - ant locales
40   - if [ -z "$SELENIUM" ] ; then ant lint ; fi
41   - set -e;
42     if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then
43     ant phpunit-hhvm ;
44     else
45     if [ ! -z "$SELENIUM" ] ; then
46     ant phpunit-nocoverage ;
47     else
48     ant phpunit ;
49     fi ;
50     fi
52 after_script:
53   - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi
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   fast_finish: true
66   include:
67     - php: 5.6
68       env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
69 cache:
70   directories:
71     - $HOME/.composer/cache/
72     - $HOME/browserstack
73     - $HOME/runkit
74 # trigger Buildtime Trend Service to parse Travis CI log
75 notifications:
76   webhooks:
77     - https://buildtimetrend.herokuapp.com/travis