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