forked from bootstraptheme-for-typo3/fluidbootstraptheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
80 lines (71 loc) · 4.86 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
- DB=mysql TYPO3=TYPO3_6-1 INTEGRATION=master BUILDER=master INTRODUCTION=TYPO3_6-1
- DB=mysql TYPO3=TYPO3_6-2 INTEGRATION=master BUILDER=master INTRODUCTION=master
- DB=mysql TYPO3=master INTEGRATION=master BUILDER=master INTRODUCTION=master
matrix:
exclude:
- php: 5.3
env: DB=mysql TYPO3=master INTEGRATION=master BUILDER=master INTRODUCTION=master
- php: 5.4
env: DB=mysql TYPO3=master INTEGRATION=master BUILDER=master INTRODUCTION=master
before_script:
- composer self-update
- 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 $INTRODUCTION --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
- cp fluidbootstraptheme/composer.json .
- composer install
- git clone --depth 1 --single-branch --branch $BUILDER git://github.com/FluidTYPO3/builder.git typo3conf/ext/builder
- git clone --depth 1 git://git.typo3.org/TYPO3CMS/Extensions/phpunit.git typo3conf/ext/phpunit
- ln -s ../../vendor/fluidtypo3/flux typo3conf/ext/flux
- ln -s ../../vendor/fluidtypo3/fluidcontent typo3conf/ext/fluidcontent
- ln -s ../../vendor/fluidtypo3/fluidpages typo3conf/ext/fluidpages
- ln -s ../../vendor/fluidtypo3/vhs typo3conf/ext/vhs
- ln -s ../../fluidbootstraptheme typo3conf/ext/fluidbootstraptheme
- 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
- >
echo "Copying configuration..";
if [[ "$TYPO3" == "master" ]]; then
# CMS 7 / master
cp typo3conf/ext/fluidbootstraptheme/Build/LocalConfiguration7.php typo3conf/LocalConfiguration.php;
cp typo3conf/ext/fluidbootstraptheme/Build/PackageStates7.php typo3conf/PackageStates.php;
else
# CMS 6
cp typo3conf/ext/fluidbootstraptheme/Build/LocalConfiguration.php typo3conf/LocalConfiguration.php;
cp typo3conf/ext/fluidbootstraptheme/Build/PackageStates.php typo3conf/PackageStates.php;
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/fluidcontent/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/fluidcontent/Build/ImportSchema.sql; fi
- if [[ "$DB" == "mysql" && -f typo3conf/ext/fluidbootstraptheme/Build/ImportSchema.sql ]]; then mysql -uroot typo3_test < typo3conf/ext/fluidbootstraptheme/Build/ImportSchema.sql; fi
- if [[ -f typo3conf/localconf.php && -f typo3conf/ext/fluidbootstraptheme/Build/localconf.php ]]; then cp typo3conf/ext/fluidbootstraptheme/Build/localconf.php typo3conf/localconf.php; fi
- if [[ -f typo3conf/ext/fluidbootstraptheme/Tests/phpunit.xml ]]; then cp typo3conf/ext/fluidbootstraptheme/Tests/phpunit.xml phpunit.xml; fi
script:
# phplint checking on all PHP source files in extension
- typo3/cli_dispatch.phpsh extbase builder:phpsyntax --extension fluidbootstraptheme
# fluid template syntax checking on all files in extension
- typo3/cli_dispatch.phpsh extbase builder:fluidsyntax --extension fluidbootstraptheme
# 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/fluidbootstraptheme
# PHPUnit tests from overridden phpunit tests configuration file
# - if [[ -f typo3conf/ext/fluidbootstraptheme/Tests/phpunit.xml ]]; then typo3/cli_dispatch.phpsh phpunit -c phpunit.xml --coverage-text; fi