-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
79 lines (70 loc) · 3.44 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
#
# This build script is provided by: https://github.com/svparijs/TravisCi.Example
# Author: Sebastiaan van Parijs
#
# For any issues of feedback report it at Github
#
# The TYPO3 project - inspiring people to share!
#
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
# list any PHP version you want to test against
php:
# aliased to a recent 5.3.x version
- 5.3
# aliased to a recent 5.4.x version
- 5.4
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
# Pgsql Fails on
#- DB=pgsql // No usecase yet.
# Setting up pre-requirements
before_script:
- cd ..
- git clone git://github.com/typo3-ci/TYPO3-Travis-Integration.git build-environment
- source build-environment/install-helper.sh
- git clone git://git.typo3.org/Flow/Distributions/Base.git Flow
# Symlink the package to the folder that its gonna go
- mkdir -p Flow/Packages/Application && cd Flow/Packages/Application && ln -s ../../../TYPO3.AccountManagement && cd ../../ # [Replace Package key here]
# Get most recent composer
- composer self-update
- composer install --dev
- if [[ "$DB" == "mysql" ]]; then mysql -u root -e 'create database flow;' && curl -Lk https://gist.github.com/raw/4276117/af19ef22064aae4875f41342845fb89de2f2b72c/Settings.Mysql.yaml > Configuration/Settings.yaml ; fi
- if [[ "$DB" == "postgres" ]]; then psql -U postgres -c 'create database flow;' && curl -Lk https://gist.github.com/raw/4276117/40b5254f29e23ff3dcdf36ae72738ad71f9d9048/Settings.Postgresql.yaml > Configuration/Settings.yaml ; fi
- mkdir Build/PhpUnit && curl -Lk https://gist.github.com/raw/4276117/950465122f99e9c1506495c50332891f2cb89f9d/FunctionalTests.xml > Build/PhpUnit/FunctionalTests.xml
- curl -Lk https://gist.github.com/raw/4276117/af763946bd4fc7f0a0462952d71f68288a39c610/UnitTests.xml > Build/PhpUnit/UnitTests.xml
script:
# Install Prerequirements
- phpunit -c Build/BuildEssentials/PhpUnit/UnitTests.xml && phpunit -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml
- if [[ "$DB" == "mysql" ]]; then ./flow doctrine:migrate --quiet && ./flow doctrine:migrate --version 0 --quiet ; fi
- phpunit -c Build/PhpUnit/UnitTests.xml && phpunit -c Build/PhpUnit/FunctionalTests.xml
- cd ../TYPO3.AccountManagement # [Replace Package key here]
- pear channel-discover pear.typo3.org
- pear channel-discover pear.phpmd.org
- pear channel-discover pear.pdepend.org
- pear install --alldeps typo3/PHPCS_FLOW3_Standard
# @todo dependency ImageMagick breaks doesn't know which one to install.
#- pear install --alldeps phpmd/PHP_PMD
- pear install pdepend/PHP_Depend-beta
- pear install phpunit/phpcpd
- pear install phpunit/phploc
- phpenv rehash
- mkdir .reports
# Lint
- find Classes -name '*.php' -exec php -l {} \;
- find Tests -name '*.php' -exec php -l {} \;
# Mess detection
#- phpmd Classes xml .buildessentials/PhpMd/Flow.xml --reportfile .reports/pmd.xml &> /dev/null
# Duplicate code
- phpcpd --log-pmd .reports/pmd-cpd.xml Classes/
# Lines of code
- phploc --log-csv .reports/phploc.csv Classes
# PHP Depend
- pdepend --jdepend-xml=.reports/jdepend.xml --jdepend-chart=.reports/dependencies.svg --overview-pyramid=.reports/pyramid.svg Classes
# Code sniffer
- phpcs --standard=FLOW3 --extensions=php Classes
- phpcs --standard=FLOW3 --extensions=php Tests
# configure notifications (email, IRC, campfire etc)
notifications:
irc: "irc.freenode.org#refactory.it"