[BUGFIX] Improve Windows support for functional tests
[Packages/TYPO3.CMS.git] / .travis.yml
1 language: php
2
3 php:
4   - 5.3
5   - 5.4
6   - 5.5
7
8 env:
9   - DB=mysql
10
11 services:
12   - memcached
13   - redis-server
14
15 notifications:
16   irc:
17     - "irc.freenode.net#typo3-cms"
18   email:
19     - typo3-team-core@lists.typo3.org
20
21 before_script:
22   - >
23     if [[ "$TRAVIS_PHP_VERSION" != "5.5" ]]; then
24         echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
25         echo "apc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
26         echo "apc.slam_defense=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
27     fi
28   - >
29     if [[ "$TRAVIS_PHP_VERSION" != "5.5" ]]; then
30         pecl install igbinary > /dev/null;
31     fi
32   - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
33   - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
34   - sudo apt-get install parallel
35   - composer self-update
36   - composer --dev install
37   - mkdir -p uploads typo3temp typo3conf/ext
38
39 script:
40   - >
41     echo;
42     echo "Running unit tests";
43     ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
44   - >
45     echo;
46     export typo3DatabaseName="typo3";
47     export typo3DatabaseHost="localhost";
48     export typo3DatabaseUsername="root";
49     export typo3DatabasePassword="";
50     grep directory typo3/sysext/core/Build/FunctionalTests.xml | awk '{print $1}' | sed 's%<directory>\(\.\./\)*\(typo3/sysext.*\)</directory>$%\2%g' | parallel --gnu 'echo; echo "Running functional {} tests"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
51   - >
52     echo;
53     echo "Running php lint";
54     /bin/bash -c "
55         if ! find typo3/ -name \*.php | parallel --gnu 'php -l {}' > /tmp/errors 2>&1; then
56             grep -v \"No syntax errors detected in\" /tmp/errors;
57             exit 99;
58         fi
59     "