-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
65 lines (58 loc) · 4.74 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: php
php:
- 5.3
- 5.4
- 5.5
env:
- DB=mysql TYPO3=master INTEGRATION=master
- DB=mysql TYPO3=TYPO3_6-1 INTEGRATION=master
matrix:
fast_finish: true
include:
- php: 5.6
env: DB=mysql TYPO3=master INTEGRATION=master
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
- cd ..
- git clone --single-branch --branch $INTEGRATION --depth 1 git://github.com/typo3-ci/TYPO3-Travis-Integration.git build-environment
- git clone --depth 1 git://github.com/FluidTYPO3/FluidTYPO3-CodingStandards.git build-environment/FluidTYPO3-CodingStandards
- git clone git://github.com/squizlabs/PHP_CodeSniffer.git build-environment/CodeSniffer
- git clone --single-branch --branch $TYPO3 --depth 1 https://github.com/TYPO3/TYPO3.CMS.git core
- source build-environment/install-helper.sh
- 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 .
- mkdir fileadmin
- mkdir uploads
- mkdir typo3temp
- git clone --depth 1 --single-branch --branch $TRAVIS_BRANCH git://github.com/FluidTYPO3/flux.git typo3conf/ext/flux
- git clone --depth 1 --single-branch --branch $TRAVIS_BRANCH git://github.com/FluidTYPO3/fluidpages.git typo3conf/ext/fluidpages
- git clone --depth 1 git://github.com/FluidTYPO3/builder.git typo3conf/ext/builder
- git clone --depth 1 git://git.typo3.org/TYPO3CMS/Extensions/phpunit.git typo3conf/ext/phpunit
- mv fluidpages_bootstrap ./typo3conf/ext/
- 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
- if [[ "$DB" == "mysql" && -f build-environment/dbimport/phpunit.sql ]]; then mysql -uroot typo3_test < build-environment/dbimport/phpunit.sql; fi
# post core schema import of extension schemas and state file from this and dependency extensions
- if [[ "$DB" == "mysql" && -f typo3conf/ext/builder/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/builder/Build/ImportSchema.sql; fi
- if [[ "$DB" == "mysql" && -f typo3conf/ext/flux/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/flux/Build/ImportSchema.sql; fi
- if [[ "$DB" == "mysql" && -f typo3conf/ext/fluidpages/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/fluidpages/Build/ImportSchema.sql; fi
- if [[ "$DB" == "mysql" && -f typo3conf/ext/fluidpages_bootstrap/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/fluidpages_bootstrap/Build/ImportSchema.sql; fi
- if [[ -f typo3conf/LocalConfiguration.php && -f typo3conf/ext/fluidpages_bootstrap/Build/LocalConfiguration.php ]]; then cp typo3conf/ext/fluidpages_bootstrap/Build/LocalConfiguration.php typo3conf/LocalConfiguration.php; fi
- if [[ -f typo3conf/ext/fluidpages_bootstrap/Build/PackageStates.php ]]; then cp typo3conf/ext/fluidpages_bootstrap/Build/PackageStates.php typo3conf/PackageStates.php; fi
- if [[ -f typo3conf/localconf.php && -f typo3conf/ext/fluidpages_bootstrap/Build/localconf.php ]]; then cp typo3conf/ext/fluidpages_bootstrap/Build/localconf.php typo3conf/localconf.php; fi
- if [[ -f typo3conf/ext/fluidpages_bootstrap/Tests/phpunit.xml ]]; then cp typo3conf/ext/fluidpages_bootstrap/Tests/phpunit.xml phpunit.xml; fi
script:
# phplint checking on all PHP source files in extension
- typo3/cli_dispatch.phpsh extbase builder:phpsyntax --extension fluidpages_bootstrap
# fluid template syntax checking on all files in extension
- typo3/cli_dispatch.phpsh extbase builder:fluidsyntax --extension fluidpages_bootstrap
# PHPCodeSniffer code inspection with only errors displayed (no warnings)
- build-environment/CodeSniffer/scripts/phpcs -n --standard=$PWD/build-environment/FluidTYPO3-CodingStandards/ruleset.xml $PWD/typo3conf/ext/fluidpages_bootstrap
# PHPUnit tests from overridden phpunit tests configuration file
- if [[ -f typo3conf/ext/fluidpages_bootstrap/Tests/phpunit.xml ]]; then typo3/cli_dispatch.phpsh phpunit -c phpunit.xml --coverage-text; fi