98cb8e70b235095b05e4d78f22519f311bd8d352
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 matrix:
4 fast_finish: true
5 allow_failures:
6 - php: 7
7
8 include:
9 - php: 5.5
10 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes
11 - php: 5.6
12 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
13 - php: 7
14 env: UNIT_TESTS=yes
15
16 sudo: false
17
18 cache:
19 directories:
20 - $HOME/.composer/cache
21
22 services:
23 - memcached
24 - redis-server
25
26 notifications:
27 irc:
28 channels:
29 - "irc.freenode.net#typo3-cms"
30 on_success: change
31 on_failure: always
32 use_notice: true
33 slack:
34 rooms:
35 secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
36 on_success: change
37 on_failure: always
38
39 before_script:
40 - mkdir parallel && cd parallel && wget http://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2 && tar xvf parallel-latest.tar.bz2 -C . --strip-components=1 && ./configure && make && cd ..
41 - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
42 - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
43 - rm -rf typo3/sysext/compatibility6
44 - composer install
45
46 script:
47 - >
48 if [[ "$UNIT_TESTS" == "yes" ]]; then
49 echo;
50 echo "Running unit tests";
51 ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
52 fi
53 - >
54 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
55 echo;
56 export typo3DatabaseName="typo3";
57 export typo3DatabaseHost="localhost";
58 export typo3DatabaseUsername="root";
59 export typo3DatabasePassword="";
60 find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | ./parallel/src/parallel --gnu --will-cite 'echo; echo "Running functional test suite {}"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
61 fi
62 - >
63 if [[ "$PHP_LINT" == "yes" ]]; then
64 echo;
65 echo "Running php lint";
66 find typo3/ -name \*.php -not -path "typo3/contrib/vendor/*" | ./parallel/src/parallel --gnu --will-cite php -d display_errors=stderr -l {} > /dev/null \;
67 fi
68 - >
69 if [[ "$XLF_CHECK" == "yes" ]]; then
70 echo;
71 echo "Running XLF checker";
72 ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
73 fi
74 - >
75 if [[ "$SUBMODULE_TEST" == "yes" ]]; then
76 echo;
77 echo "Running git submodule check";
78 /bin/bash -c "
79 if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
80 echo \"Found a submodule definition in repository\";
81 exit 99;
82 fi
83 "
84 fi