d412fa89c78d9db9b8f69d461893ee853d44e1bf
[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 ACCEPTANCE_TESTS=no JSUNIT_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes EXCEPTIONCODE_TEST=yes
12
13 sudo: false
14
15 addons:
16 apt:
17 packages:
18 - parallel
19 - ack-grep
20 - nginx
21 - realpath
22
23 cache:
24 directories:
25 - $HOME/.composer/cache
26
27 env:
28 global:
29 secure: NGVAI0ayw2h9pB2bi2u9AkfV1OKa2LCrGXNtxAvQhFxKW28qmeOUehFuacxpvCI5fA8Ae7oVo2Ba0vcpb5a3uJry1lMpxcn9Ic+voB7SwlCuL6Rx/vntPkYUH+58cC3t40yHKArCUE9KCJA6znNCaZ7MyG6dWHgry0cvAjVOQzE=
30
31 services:
32 - memcached
33 - redis-server
34
35 notifications:
36 irc:
37 channels:
38 - "irc.freenode.net#typo3-cms"
39 on_success: change
40 on_failure: always
41 use_notice: true
42 slack:
43 rooms:
44 secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
45 on_success: change
46 on_failure: always
47 webhooks:
48 urls:
49 - http://www.t3bot.de/hooks/travis/index.php
50 on_success: always
51 on_failure: always
52 on_start: never
53
54 before_script:
55 - phpenv config-rm xdebug.ini
56 - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
57 - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
58 - if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
59 - composer install
60 - typo3/sysext/core/Build/Configuration/TravisNginxFpm/ConfigureStartNginxFpm.sh
61 - mkdir -p typo3temp/var/tests
62 - export typo3DatabaseName="typo3"
63 - export typo3DatabaseHost="localhost"
64 - export typo3DatabaseUsername="root"
65 - export typo3DatabasePassword=""
66
67 before_install:
68 - export DISPLAY=:99.0
69 - sh -e /etc/init.d/xvfb start
70
71 script:
72 - >
73 if [[ "$UNIT_TESTS" == "yes" ]]; then
74 ./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml
75 fi
76
77 - >
78 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
79 find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --jobs 6 --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml {}'
80 fi
81
82 - >
83 if [[ "$ACCEPTANCE_TESTS" == "yes" ]]; then
84 ./bin/codecept run Acceptance -c typo3/sysext/core/Build/AcceptanceTests.yml --debug
85 fi
86
87 - >
88 if [[ "$JSUNIT_TESTS" == "yes" ]]; then
89 cd Build && npm install && cd ..
90 ./Build/node_modules/karma/bin/karma start typo3/sysext/core/Build/Configuration/JSUnit/karma.conf.js --single-run
91 fi
92
93 - >
94 if [[ "$PHP_LINT" == "yes" ]]; then
95 find typo3/ -name \*.php -not -path "vendor/*" | parallel --jobs 6 --gnu php -d display_errors=stderr -l {} > /dev/null \;
96 fi
97
98 - >
99 if [[ "$XLF_CHECK" == "yes" ]]; then
100 ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
101 fi
102
103 - >
104 if [[ "$SUBMODULE_TEST" == "yes" ]]; then
105 /bin/bash -c "
106 if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
107 echo \"Found a submodule definition in repository\";
108 exit 99;
109 fi
110 "
111 fi
112
113 - >
114 if [[ "$EXCEPTIONCODE_TEST" == "yes" ]]; then
115 ./typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh
116 fi