[FOLLOWUP][TASK] Install PhantomJS via composer and add codeception integration
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 matrix:
4 fast_finish: true
5
6 include:
7 - php: 7
8 env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes ACCEPTANCE_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes
9
10 sudo: false
11
12 addons:
13 apt:
14 packages:
15 - parallel
16
17 cache:
18 directories:
19 - $HOME/.composer/cache
20
21 env:
22 global:
23 secure: NGVAI0ayw2h9pB2bi2u9AkfV1OKa2LCrGXNtxAvQhFxKW28qmeOUehFuacxpvCI5fA8Ae7oVo2Ba0vcpb5a3uJry1lMpxcn9Ic+voB7SwlCuL6Rx/vntPkYUH+58cC3t40yHKArCUE9KCJA6znNCaZ7MyG6dWHgry0cvAjVOQzE=
24
25 services:
26 - memcached
27 - redis-server
28
29 notifications:
30 irc:
31 channels:
32 - "irc.freenode.net#typo3-cms"
33 on_success: change
34 on_failure: always
35 use_notice: true
36 slack:
37 rooms:
38 secure: nHWVTPyG3CQWIcYA1LASS11dD0/NBcmrAyr3xxQW0XYtH47ZUKRlEtxrVLuL7ptciNwMbfZgsiRQ1QGWDerHUlBkg0iwRxpUZgeylzWaiXsHFVAp2IBfEX54KrWeYm9gewIBDDtnp+sLgpXGgmpIs2bAGkZe5129UsUExoWh0+g=
39 on_success: change
40 on_failure: always
41 webhooks:
42 urls:
43 - http://www.t3bot.de/hooks/travis/index.php
44 on_success: always
45 on_failure: always
46 on_start: never
47
48 before_script:
49 - phpenv config-rm xdebug.ini
50 - if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
51 - composer install
52
53 script:
54 - >
55 if [[ "$UNIT_TESTS" == "yes" ]]; then
56 echo;
57 echo "Running unit tests";
58 ./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml
59 fi
60 - >
61 if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
62 echo;
63 export typo3DatabaseName="typo3";
64 export typo3DatabaseHost="localhost";
65 export typo3DatabaseUsername="root";
66 export typo3DatabasePassword="";
67 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 {}'
68 fi
69 - >
70 if [[ "$ACCEPTANCE_TESTS" == "yes" ]]; then
71 php -S 0.0.0.0:8000 >/dev/null 2>&1 &
72 export typo3DatabaseName="typo3";
73 export typo3DatabaseHost="localhost";
74 export typo3DatabaseUsername="root";
75 export typo3DatabasePassword="";
76 ./bin/codecept run acceptance -c typo3/sysext/core/Build/AcceptanceTests.yml typo3/sysext/core/Tests/Acceptance --debug
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