[TASK] Script finding duplicate exception codes for Travis
[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  EXCEPTIONCODE_TEST=yes
9
10 sudo: false
11
12 addons:
13   apt:
14     packages:
15       - parallel
16       - ack-grep
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   webhooks:
43     urls:
44       - http://www.t3bot.de/hooks/travis/index.php
45     on_success: always
46     on_failure: always
47     on_start: never
48
49 before_script:
50   - phpenv config-rm xdebug.ini
51   - if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
52   - composer install
53
54 script:
55   - >
56     if [[ "$UNIT_TESTS" == "yes" ]]; then
57       echo;
58       echo "Running unit tests";
59       ./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml
60     fi
61   - >
62     if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
63         echo;
64         export typo3DatabaseName="typo3";
65         export typo3DatabaseHost="localhost";
66         export typo3DatabaseUsername="root";
67         export typo3DatabasePassword="";
68         find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --jobs 6 --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml {}'
69     fi
70   - >
71     if [[ "$ACCEPTANCE_TESTS" == "yes" ]]; then
72         export _JAVA_OPTIONS="-Xms1024m -Xmx1024m";
73         ./bin/selenium-server-standalone >/dev/null 2>&1 &
74         php -S 0.0.0.0:8000 >/dev/null 2>&1 &
75         sleep 5;
76         export typo3DatabaseName="typo3";
77         export typo3DatabaseHost="localhost";
78         export typo3DatabaseUsername="root";
79         export typo3DatabasePassword="";
80         ./bin/codecept run Acceptance -c typo3/sysext/core/Build/AcceptanceTests.yml --debug
81     fi
82   - >
83     if [[ "$PHP_LINT" == "yes" ]]; then
84         echo;
85         echo "Running php lint";
86         find typo3/ -name \*.php -not -path "vendor/*" | parallel --jobs 6 --gnu php -d display_errors=stderr -l {} > /dev/null \;
87     fi
88   - >
89     if [[ "$XLF_CHECK" == "yes" ]]; then
90         echo;
91         echo "Running XLF checker";
92         ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
93     fi
94   - >
95       if [[ "$SUBMODULE_TEST" == "yes" ]]; then
96           echo;
97           echo "Running git submodule check";
98           /bin/bash -c "
99               if [[ `git submodule status 2>&1 | wc -l` -ne 0 ]]; then
100                   echo \"Found a submodule definition in repository\";
101                   exit 99;
102               fi
103           "
104       fi
105
106   - >
107     if [[ "$EXCEPTIONCODE_TEST" == "yes" ]]; then
108         echo;
109         echo "Running duplicate exception code checker";
110         ./typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh
111     fi