[TASK] Reformat .travis.yml to be better readable
[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 UNITTESTS=1
10   - DB=none PHPLINT=1
11
12 services:
13   - memcached
14
15 before_script:
16   - git clone --single-branch --branch master --depth 1 git://github.com/typo3-ci/TYPO3-Travis-Integration.git build-environment
17   - source build-environment/install-helper.sh
18
19   - >
20     if [[ "$UNITTESTS" == "1" ]]; then
21         if [[ "$TRAVIS_PHP_VERSION" == "5.3" ]]; then
22                 installPhpModule -y apc;
23         fi
24         if [[ "$TRAVIS_PHP_VERSION" != "5.5" ]]; then
25                 installPhpModule igbinary
26         fi
27         installPhpModule -y memcache
28         installPhpModule redis
29         mv build-environment/typo3conf .
30         git clone --single-branch --branch master --depth 1 git://git.typo3.org/TYPO3v4/Extensions/phpunit.git typo3conf/ext/phpunit/
31         mkdir fileadmin
32         mkdir uploads
33         mkdir typo3temp
34     fi
35
36   - >
37     if [[ "$DB" == "mysql" ]]; then
38         mysql -e "DROP DATABASE IF EXISTS typo3_test;" -uroot
39         mysql -e "CREATE DATABASE IF NOT EXISTS typo3_test;" -uroot
40         php build-environment/dbimport/DatabaseImport.php
41         mysql -uroot typo3_test < build-environment/dbimport/cli_users.sql
42     fi
43
44 script:
45   - >
46     if [[ "$PHPLINT" == "1" ]]; then
47         phpLint all
48     fi
49   - >
50     if [[ "$UNITTESTS" == "1" ]]; then
51         php $PWD/typo3/cli_dispatch.phpsh phpunit -c typo3/sysext/core/Build/UnitTests.xml
52     fi