Skip to content

Instantly share code, notes, and snippets.

@derhansen derhansen/.travis.yml
Last active Aug 29, 2015

Embed
What would you like to do?
Travis CI configuration for sf_event_mgt
language: php
php:
- 5.4
- 5.5
- 5.6
env:
matrix:
- DB=mysql TYPO3_BRANCH=TYPO3_6-2 COVERAGE=0
- DB=mysql TYPO3_BRANCH=master COVERAGE=0
global:
secure: INo+FZa/Z2hTw6UwwMh0qjKllgIlqSz8S7S76HGR15L4sqnmG22spT4IwXjavV2jfR/Glo6PxR5dz9Bn9Br03dh72MThLKqBAI9pJR+Ig3SNcvOGCm/8h4hrKUKJDkge+GQEzL4HuXO0OenEIPXCSlNFlBxQN824TMJFQgvGHnA=
matrix:
fast_finish: true
include:
- php: 5.6
env: DB=mysql TYPO3_BRANCH=master COVERAGE=1
exclude:
- php: 5.4
env: DB=mysql TYPO3_BRANCH=master COVERAGE=0
sudo: false
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
notifications:
email:
- derhansen@gmail.com
before_script:
- cd ..
- git clone --single-branch --branch $TYPO3_BRANCH --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
- mv typo3_core/* .
- if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
- composer install
- mkdir -p uploads typo3temp typo3conf/ext
- mv sf_event_mgt typo3conf/ext/
script:
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit --colors -c typo3conf/ext/sf_event_mgt/Tests/Build/UnitTests.xml
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit --coverage-clover=unittest-coverage.clover --colors -c typo3conf/ext/sf_event_mgt/Tests/Build/UnitTests.xml
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
export typo3DatabaseName="typo3";
export typo3DatabaseHost="localhost";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
find . -wholename '*/typo3conf/ext/sf_event_mgt/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --coverage-clover={}functionaltest-coverage.clover --colors -c typo3conf/ext/sf_event_mgt/Tests/Build/FunctionalTests.xml {}'
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
cp -R typo3conf/ext/sf_event_mgt/.git .
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover
find . -wholename '*/typo3conf/ext/sf_event_mgt/Tests/Functional/*Test.php' -exec php ocular.phar code-coverage:upload --format=php-clover {}functionaltest-coverage.clover \;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.