-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (39 loc) · 2.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: php
matrix:
include:
- php: 5.5
env: DB=mysql TYPO3=master INTEGRATION=master COVERAGE=1
services:
- memcached
notifications:
email:
before_script:
# Get latest git version cause of travis issues (https://github.com/travis-ci/travis-ci/issues/1710)
- sudo apt-get update && sudo apt-get install git
# Install build dependencies
- cd ..
- git clone --single-branch --branch $INTEGRATION --depth 1 git://github.com/georgringer/TYPO3-Travis-Integration.git build-environment
- git clone --single-branch --branch $TYPO3 --depth 1 https://github.com/TYPO3/TYPO3.CMS.git core
- source build-environment/install-helper.sh
- if [[ "$TRAVIS_PHP_VERSION" != "5.5" ]]; then installPhpModule igbinary; fi
- installPhpModule -y memcache
- installPhpModule redis
- if [[ "$TRAVIS_PHP_VERSION" == "5.3" ]]; then installPhpModule -y apc; fi
# Install rudimentary TYPO3
- git clone --single-branch --branch $TYPO3 --depth 1 git://git.typo3.org/TYPO3CMS/Distributions/Introduction.git build-environment/Introduction
- mv core/typo3 .
- if [[ -d core/t3lib ]]; then mv core/t3lib . ; fi
- mv build-environment/typo3conf .
- git clone --single-branch --branch master --depth 1 git://git.typo3.org/TYPO3CMS/Extensions/phpunit.git typo3conf/ext/phpunit/
- mv mailqueue ./typo3conf/ext
- mkdir fileadmin
- mkdir uploads
- if [[ "$DB" == "mysql" ]]; then mysql -e "DROP DATABASE IF EXISTS typo3_test;" -uroot; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS typo3_test;" -uroot; fi
- if [[ "$DB" == "mysql" ]]; then mysql -uroot typo3_test < build-environment/Introduction/typo3conf/ext/introduction/Resources/Private/Subpackages/Introduction/Database/introduction.sql; fi
- if [[ "$DB" == "mysql" && -f build-environment/dbimport/cache_tables.sql ]]; then mysql -uroot typo3_test < build-environment/dbimport/cache_tables.sql; fi
- if [[ "$DB" == "mysql" && -f build-environment/dbimport/cli_users.sql ]]; then mysql -uroot typo3_test < build-environment/dbimport/cli_users.sql; fi
script:
- if [[ "$COVERAGE" == "1" ]]; then php $PWD/typo3/cli_dispatch.phpsh phpunit --coverage-clover=coverage.clover -c typo3conf/ext/mailque/Tests/Build/UnitTests.xml; fi
- if [[ "$COVERAGE" == "0" ]]; then php $PWD/typo3/cli_dispatch.phpsh phpunit -c typo3conf/ext/mailqueue/Tests/Build/UnitTests.xml; fi