b0da4aea0fc242890057a8b2867498f220b97b24
[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 JSUNIT_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
20 cache:
21 directories:
22 - $HOME/.composer/cache
23
24 services:
25 - memcached
26 - redis-server
27
28 notifications:
29 irc:
30 channels:
31 - "irc.freenode.net#typo3-cms"
32 on_success: change
33 on_failure: always
34 use_notice: true
35 slack:
36 rooms:
37 secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
38 on_success: change
39 on_failure: always
40 webhooks:
41 urls:
42 - http://www.t3bot.de/hooks/travis/index.php
43 on_success: always
44 on_failure: always
45 on_start: never
46
47 before_script:
48 - phpenv config-rm xdebug.ini
49 - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
50 - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
51 - composer install
52 - export typo3DatabaseName="typo3"
53 - export typo3DatabaseHost="localhost"
54 - export typo3DatabaseUsername="root"
55 - export typo3DatabasePassword=""
56
57 script:
58 - >
59 if [[ "$UNIT_TESTS" == "yes" ]]; then
60 ./bin/phpunit -c components/testing_framework/Resources/Core/Build/UnitTests.xml
61 fi
62
63 - >
64 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
65 ./components/testing_framework/Resources/Core/Build/Scripts/splitFunctionalTests.sh 14
66 parallel --jobs 4 -a <(seq 0 13) --gnu './bin/phpunit -c components/testing_framework/Resources/Core/Build/FunctionalTests-Job-{}.xml'
67 fi
68
69 - >
70 if [[ "$JSUNIT_TESTS" == "yes" ]]; then
71 cd Build && npm update -g npm && npm install && cd ..
72 ./Build/node_modules/karma/bin/karma start components/testing_framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js --single-run
73 fi
74
75 - >
76 if [[ "$PHP_LINT" == "yes" ]]; then
77 find typo3/ -name \*.php -not -path "vendor/*" | parallel --jobs 6 --gnu php -d display_errors=stderr -l {} > /dev/null \;
78 fi
79
80 - >
81 if [[ "$XLF_CHECK" == "yes" ]]; then
82 ./Build/Scripts/xlfcheck.sh
83 fi
84
85 - >
86 if [[ "$SUBMODULE_TEST" == "yes" ]]; then
87 /bin/bash -c "
88 if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
89 echo \"Found a submodule definition in repository\";
90 exit 99;
91 fi
92 "
93 fi