83adac2119b94dd6f4231b3793adcdc76dcdeb0e
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 matrix:
4   allow_failures:
5     - php: 5.6
6   include:
7     - php: 5.3
8     - php: 5.4
9     - php: 5.5
10       env: SUBMODULE_TEST=yes
11     - php: 5.6
12
13 services:
14   - memcached
15   - redis-server
16
17 notifications:
18   irc:
19     channels:
20       - "irc.freenode.net#typo3-cms"
21     on_success: change
22     on_failure: always
23     use_notice: true
24   slack:
25     rooms:
26       secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
27     on_success: change
28     on_failure: always
29
30 before_script:
31   - >
32     if [[ "$TRAVIS_PHP_VERSION" = "5.3" || "$TRAVIS_PHP_VERSION" = "5.4" ]]; then
33         pecl install igbinary > /dev/null;
34     fi
35   - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
36   - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
37   - chmod a+x typo3/sysext/core/Build/Scripts/*
38   - sudo apt-get install parallel
39   - composer self-update
40   - composer install
41
42 script:
43   - >
44     echo;
45     echo "Running unit tests";
46     ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
47   - >
48     echo;
49     export typo3DatabaseName="typo3";
50     export typo3DatabaseHost="localhost";
51     export typo3DatabaseUsername="root";
52     export typo3DatabasePassword="";
53     find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
54   - >
55     echo;
56     echo "Running php lint";
57     find typo3/ -name \*.php -not -path "typo3/contrib/vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
58   - >
59     echo;
60     echo "Running XLF checker";
61     ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
62   - >
63     if [[ "$SUBMODULE_TEST" == "yes" ]]; then
64         echo;
65         echo "Running git submodule check";
66         /bin/bash -c "
67             if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
68                 echo \"Found a submodule definition in repository\";
69                 exit 99;
70             fi
71         "
72     fi