-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
61 lines (53 loc) · 3.92 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
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:
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 git://git.typo3.org/TYPO3CMS/Extensions/phpunit.git typo3conf/ext/phpunit
- git clone --depth 1 git://github.com/FluidTYPO3/builder.git typo3conf/ext/builder
- mv tool ./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/tool/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/tool/Build/ImportSchema.sql; fi
- if [[ -f typo3conf/LocalConfiguration.php && -f typo3conf/ext/tool/Build/LocalConfiguration.php ]]; then cp typo3conf/ext/tool/Build/LocalConfiguration.php typo3conf/LocalConfiguration.php; fi
- if [[ -f typo3conf/ext/tool/Build/PackageStates.php ]]; then cp typo3conf/ext/tool/Build/PackageStates.php typo3conf/PackageStates.php; fi
- if [[ -f typo3conf/localconf.php && -f typo3conf/ext/tool/Build/localconf.php ]]; then cp typo3conf/ext/tool/Build/localconf.php typo3conf/localconf.php; fi
- if [[ -f typo3conf/ext/tool/Tests/phpunit.xml ]]; then cp typo3conf/ext/tool/Tests/phpunit.xml phpunit.xml; fi
script:
# phplint checking on all PHP source files in extension
- typo3/cli_dispatch.phpsh extbase builder:phpsyntax --extension tool
# fluid template syntax checking on all files in extension
- typo3/cli_dispatch.phpsh extbase builder:fluidsyntax --extension tool
# 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/tool
# PHPUnit tests from overridden phpunit tests configuration file
- if [[ -f typo3conf/ext/tool/Tests/phpunit.xml ]]; then typo3/cli_dispatch.phpsh phpunit -c phpunit.xml --coverage-text; fi