4738a8162812b04d040bdc5d17fdd684dea3bff9
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 node_js:
4     - "0.10"
5
6 matrix:
7   fast_finish: true
8
9   include:
10     - php: 7
11       env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes
12
13 sudo: false
14
15 addons:
16   apt:
17     packages:
18       - parallel
19       - language-pack-de
20
21 cache:
22   directories:
23     - $HOME/.composer/cache
24
25 services:
26   - memcached
27   - redis-server
28
29 notifications:
30   irc:
31     channels:
32       - "irc.freenode.net#typo3-cms"
33     on_success: change
34     on_failure: always
35     use_notice: true
36   slack:
37     rooms:
38       secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
39     on_success: change
40     on_failure: always
41   webhooks:
42     urls:
43       - http://www.t3bot.de/hooks/travis/index.php
44     on_success: always
45     on_failure: always
46     on_start: never
47
48 before_script:
49   - phpenv config-rm xdebug.ini
50   - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
51   - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
52   - COMPOSER_ROOT_VERSION=dev-master composer install
53   - export typo3DatabaseName="typo3"
54   - export typo3DatabaseHost="localhost"
55   - export typo3DatabaseUsername="root"
56   - export typo3DatabasePassword=""
57
58 script:
59   - >
60     if [[ "$UNIT_TESTS" == "yes" ]]; then
61       ./bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml
62     fi
63
64   - >
65     if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
66       ./vendor/typo3/testing-framework/Resources/Core/Build/Scripts/splitFunctionalTests.sh 14
67       parallel --jobs 4 -a <(seq 0 13) --gnu './bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests-Job-{}.xml'
68     fi
69
70   - >
71     if [[ "$PHP_LINT" == "yes" ]]; then
72       find typo3/ -name \*.php -not -path "vendor/*" | parallel --jobs 6 --gnu php -d display_errors=stderr -l {} > /dev/null \;
73     fi
74
75   - >
76     if [[ "$XLF_CHECK" == "yes" ]]; then
77       ./Build/Scripts/xlfcheck.sh
78     fi
79
80   - >
81     if [[ "$SUBMODULE_TEST" == "yes" ]]; then
82       /bin/bash -c "
83         if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
84           echo \"Found a submodule definition in repository\";
85           exit 99;
86         fi
87       "
88     fi