[TASK] Travis: Add github oauth token
[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 env:
23 global:
24 secure: NGVAI0ayw2h9pB2bi2u9AkfV1OKa2LCrGXNtxAvQhFxKW28qmeOUehFuacxpvCI5fA8Ae7oVo2Ba0vcpb5a3uJry1lMpxcn9Ic+voB7SwlCuL6Rx/vntPkYUH+58cC3t40yHKArCUE9KCJA6znNCaZ7MyG6dWHgry0cvAjVOQzE=
25
26 services:
27 - memcached
28 - redis-server
29
30 notifications:
31 irc:
32 channels:
33 - "irc.freenode.net#typo3-cms"
34 on_success: change
35 on_failure: always
36 use_notice: true
37 slack:
38 rooms:
39 secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
40 on_success: change
41 on_failure: always
42
43 before_script:
44 - 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 ..
45 - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
46 - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
47 - rm -rf typo3/sysext/compatibility6
48 - if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
49 - composer install
50
51 script:
52 - >
53 if [[ "$UNIT_TESTS" == "yes" ]]; then
54 echo;
55 echo "Running unit tests";
56 ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
57 fi
58 - >
59 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
60 echo;
61 export typo3DatabaseName="typo3";
62 export typo3DatabaseHost="localhost";
63 export typo3DatabaseUsername="root";
64 export typo3DatabasePassword="";
65 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 {}'
66 fi
67 - >
68 if [[ "$PHP_LINT" == "yes" ]]; then
69 echo;
70 echo "Running php lint";
71 find typo3/ -name \*.php -not -path "typo3/contrib/vendor/*" | ./parallel/src/parallel --gnu --will-cite php -d display_errors=stderr -l {} > /dev/null \;
72 fi
73 - >
74 if [[ "$XLF_CHECK" == "yes" ]]; then
75 echo;
76 echo "Running XLF checker";
77 ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
78 fi
79 - >
80 if [[ "$SUBMODULE_TEST" == "yes" ]]; then
81 echo;
82 echo "Running git submodule check";
83 /bin/bash -c "
84 if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
85 echo \"Found a submodule definition in repository\";
86 exit 99;
87 fi
88 "
89 fi