Permalink
Browse files

Add CS build to Travis

  • Loading branch information...
1 parent 376865e commit a1a27a6a3fb1d4815402dcf56d284f9f4f3918c7 @bcrowe bcrowe committed Sep 17, 2015
Showing with 15 additions and 2 deletions.
  1. +13 −1 .travis.yml
  2. +2 −1 composer.json
View
@@ -1,5 +1,10 @@
language: php
+env:
+ global:
+ - PHPCS=0
+ - RUN_TESTS=1
+
services:
- mongodb
@@ -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"
View
@@ -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/" }

0 comments on commit a1a27a6

Please sign in to comment.