Skip to content

Instantly share code, notes, and snippets.

@justinyost
Last active August 29, 2015 13:56
Show Gist options
  • Save justinyost/9282896 to your computer and use it in GitHub Desktop.
Save justinyost/9282896 to your computer and use it in GitHub Desktop.
Super Simple .travis.yml with CakePHP 2.0+ Plugins
# Language Tests are Running In
language: php
# PHP Versions to Test
php:
- 5.3
- 5.4
- 5.5
# Environment Variables to set
env:
global:
# Services to Enable
services:
# Branches to be built or not
branches:
# Blacklist these branches
except:
- master
- staging
- gh-pages
# Before Installing Software/Dependencies Needed
before_install:
- git submodule update --init --recursive
# Install Software/Dependencies Needed
install:
- pear channel-discover pear.cakephp.org
- pear install --alldeps cakephp/CakePHP_CodeSniffer
- composer install --dev
# Before the Test Script Runs
before_script:
- git clone git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp
- cp -R ../{PluginDownloadedName} plugins/{PluginName}
- chmod -R 777 ./app/tmp
- phpenv rehash
# Test Script Call
script:
- sh -c "phpcs -p --extensions=php --standard=CakePHP --report-full --report-summary ./plugins/{PluginName}/Controller ./plugins/{PluginName}/Lib ./plugins/{PluginName}/Presenter; ./lib/Cake/Console/cake test {PluginName} All{PluginName} --stderr --coverage-clover build/logs/clover.xml --coverage-html build/logs/coverage;"
# After a Successful Build
after_success:
# After a Failed Build
after_failure:
# After every Build
after_script:
# Notifications Settings
notifications:
email: false
@josegonzalez
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment