Skip to content

Commit

Permalink
Rework travis file (#22)
Browse files Browse the repository at this point in the history
Rework travis file:
* remove composer update because it is done automatically by Travis now
* remove xdebug without test on PHP version to be more versatile
* Update composer.lock
* Add php-cs-fixer
* Apply PSR2 fixes
* Ad composer cache
  • Loading branch information
jmleroux authored Feb 11, 2017
1 parent f9e7530 commit f5db562
Show file tree
Hide file tree
Showing 9 changed files with 566 additions and 473 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bin/behat
/bin/php-cs-fixer
/bin/phpspec
/vendor
/vendor
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm

matrix:
allow_failures:
- php: hhvm

cache:
directories:
- $HOME/.composer/cache

before_install:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
- composer selfupdate
- phpenv config-rm xdebug.ini || echo "xdebug not available for PHP $TRAVIS_PHP_VERSION"

install:
- composer --prefer-dist --no-interaction update

script:
- bin/phpspec run --format=pretty
- bin/behat
- bin/php-cs-fixer --dry-run -v fix src --rules=@PSR2


notifications:
email:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
},
"require-dev": {
"phpspec/phpspec": "2.*",
"behat/behat": "3.*"
"behat/behat": "3.*",
"friendsofphp/php-cs-fixer": "@stable"
},
"config": {
"bin-dir": "bin"
Expand Down
Loading

0 comments on commit f5db562

Please sign in to comment.