Add syntax checking and PHPUnit to Travis
This commit is contained in:
15
.php_cs
Normal file
15
.php_cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return Symfony\CS\Config\Config::create()
|
||||||
|
->level(Symfony\CS\FixerInterface::NONE_LEVEL)
|
||||||
|
->fixers([
|
||||||
|
"psr2",
|
||||||
|
"-braces",
|
||||||
|
"-psr0",
|
||||||
|
])
|
||||||
|
->finder(
|
||||||
|
Symfony\CS\Finder\DefaultFinder::create()
|
||||||
|
->in(__DIR__ . "/bin")
|
||||||
|
->in(__DIR__ . "/src")
|
||||||
|
->in(__DIR__ . "/test")
|
||||||
|
);
|
||||||
27
.travis.yml
Normal file
27
.travis.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
language: php
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 5.5
|
||||||
|
- 5.6
|
||||||
|
- 7.0
|
||||||
|
- nightly
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- vendor
|
||||||
|
|
||||||
|
install:
|
||||||
|
- phpenv config-rm xdebug.ini
|
||||||
|
- composer self-update
|
||||||
|
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer require --dev --no-update phpunit/phpunit ^4; fi
|
||||||
|
- composer require satooshi/php-coveralls dev-master --dev --no-update
|
||||||
|
- composer update --ignore-platform-reqs
|
||||||
|
- composer show --installed
|
||||||
|
|
||||||
|
script:
|
||||||
|
- find -name "*.php" -not -path "./vendor/*" -print0 | xargs -n 1 -0 php -l
|
||||||
|
- $(php -r 'if (PHP_MAJOR_VERSION >= 7) echo "phpdbg -qrr"; else echo "php";') vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
|
||||||
|
- php vendor/bin/php-cs-fixer --diff --dry-run -v fix
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- php vendor/bin/coveralls -v
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5",
|
"phpunit/phpunit": "^5",
|
||||||
|
"fabpot/php-cs-fixer": "^1.9",
|
||||||
"macfja/phar-builder": "^0.2.3"
|
"macfja/phar-builder": "^0.2.3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|||||||
Reference in New Issue
Block a user