[TASK] .travis.yml cleanup
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 matrix:
4 fast_finish: true
5
6 include:
7 - php: 5.5
8 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes
9 - php: 5.6
10 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
11 - php: 7
12 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
13
14 sudo: false
15
16 addons:
17 apt:
18 packages:
19 - parallel
20
21 cache:
22 directories:
23 - $HOME/.composer/cache
24
25 env:
26 global:
27 secure: NGVAI0ayw2h9pB2bi2u9AkfV1OKa2LCrGXNtxAvQhFxKW28qmeOUehFuacxpvCI5fA8Ae7oVo2Ba0vcpb5a3uJry1lMpxcn9Ic+voB7SwlCuL6Rx/vntPkYUH+58cC3t40yHKArCUE9KCJA6znNCaZ7MyG6dWHgry0cvAjVOQzE=
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 webhooks:
46 urls:
47 - http://www.t3bot.de/hooks/travis/index.php
48 on_success: always
49 on_failure: always
50 on_start: never
51
52 before_script:
53 - phpenv config-rm xdebug.ini
54 - >
55 if [[ "$TRAVIS_PHP_VERSION" < "7" && -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]]; then
56 echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
57 echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
58 fi
59 - if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
60 - composer install
61
62 script:
63 - >
64 if [[ "$UNIT_TESTS" == "yes" ]]; then
65 echo;
66 echo "Running unit tests";
67 ./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml
68 fi
69 - >
70 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
71 echo;
72 export typo3DatabaseName="typo3";
73 export typo3DatabaseHost="localhost";
74 export typo3DatabaseUsername="root";
75 export typo3DatabasePassword="";
76 find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml {}'
77 fi
78 - >
79 if [[ "$PHP_LINT" == "yes" ]]; then
80 echo;
81 echo "Running php lint";
82 find typo3/ -name \*.php -not -path "vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
83 fi
84 - >
85 if [[ "$XLF_CHECK" == "yes" ]]; then
86 echo;
87 echo "Running XLF checker";
88 ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
89 fi
90 - >
91 if [[ "$SUBMODULE_TEST" == "yes" ]]; then
92 echo;
93 echo "Running git submodule check";
94 /bin/bash -c "
95 if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
96 echo \"Found a submodule definition in repository\";
97 exit 99;
98 fi
99 "
100 fi