Skip to content

Commit

Permalink
Add CS build to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Sep 17, 2015
1 parent 376865e commit a1a27a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
language: php

env:
global:
- PHPCS=0
- RUN_TESTS=1

services:
- mongodb

Expand All @@ -10,9 +15,16 @@ php:

sudo: false

matrix:
include:
- php: 5.6
env: PHPCS=1 RUN_TESTS=0

before_script:
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- composer self-update
- composer install --dev -o

script: phpunit --coverage-text
script:
- sh -c "if [ '$RUN_TESTS' = '1' ]; then phpunit --coverage-text; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p -n --extensions=php --standard=psr2 ./src; fi"
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"php": ">=5.4.0"
},
"require-dev": {
"mockery/mockery": "0.9.*"
"mockery/mockery": "0.9.*",
"squizlabs/php_codesniffer": "2.3.*"
},
"autoload": {
"psr-0": { "League\\Monga": "src/" }
Expand Down

0 comments on commit a1a27a6

Please sign in to comment.