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