forked from FluidTYPO3/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (48 loc) · 3.34 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
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:
- 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 --single-branch --branch development --depth 1 git://github.com/FluidTYPO3/builder.git typo3conf/ext/builder
- mv flux ./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
# 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 [[ -f typo3conf/LocalConfiguration.php && -f typo3conf/ext/flux/Build/LocalConfiguration.php ]]; then cp typo3conf/ext/flux/Build/LocalConfiguration.php typo3conf/LocalConfiguration.php; fi
- if [[ -f typo3conf/ext/flux/Build/PackageStates.php ]]; then cp typo3conf/ext/flux/Build/PackageStates.php typo3conf/PackageStates.php; fi
- if [[ -f typo3conf/localconf.php && -f typo3conf/ext/flux/Build/localconf.php ]]; then cp typo3conf/ext/flux/Build/localconf.php typo3conf/localconf.php; fi
- if [[ -f typo3conf/ext/flux/Tests/phpunit.xml ]]; then cp typo3conf/ext/flux/Tests/phpunit.xml phpunit.xml; fi
script:
# phplint checking on all PHP source files in extension
- typo3/cli_dispatch.phpsh extbase builder:phpsyntax --extension flux
# fluid template syntax checking on all files in extension
- typo3/cli_dispatch.phpsh extbase builder:fluidsyntax --extension flux
# 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/flux
# PHPUnit tests from overridden phpunit tests configuration file
- if [[ -f typo3conf/ext/flux/Tests/phpunit.xml ]]; then typo3/cli_dispatch.phpsh phpunit -c phpunit.xml; fi