Skip to content

Commit

Permalink
improve development and CI process
Browse files Browse the repository at this point in the history
  • Loading branch information
xalopp authored and mmoll committed Nov 19, 2017
1 parent 4a1384d commit c53298b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,11 @@ php:
- 7.0
- 7.1
- 7.2
env:
global:
- PHPCS_DIR=vendor/squizlabs/php_codesniffer
- MO4CS_DIR=vendor/squizlabs/php_codesniffer/src/Standards/MO4

before_script:
- phpenv config-rm xdebug.ini
- composer install
- mkdir -p $MO4CS_DIR
- cp ruleset.xml $MO4CS_DIR/
- cp -R Sniffs $MO4CS_DIR/
- cp -R Tests $MO4CS_DIR/
- (cd $PHPCS_DIR/src/Standards ; git clone https://github.com/djoos/Symfony-coding-standard.git Symfony ; mv Symfony/Symfony/* Symfony/)

script:
- (cd $PHPCS_DIR ; ../../bin/phpunit --filter MO4)
- $PHPCS_DIR/bin/phpcs $MO4CS_DIR --standard=$PHPCS_DIR/phpcs.xml.dist --report=full -np
- vendor/bin/phpunit --filter MO4
- vendor/bin/phpcs MO4 --report=full -np
9 changes: 9 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for PHP_CodeSniffer itself.</description>

<exclude-pattern>*/Tests/*\.(inc|css|js)</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>

<rule ref="vendor/squizlabs/php_codesniffer/phpcs.xml.dist" />
</ruleset>
8 changes: 8 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="vendor/squizlabs/php_codesniffer/tests/bootstrap.php">
<testsuites>
<testsuite name="PHP_CodeSniffer Test Suite">
<file>vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php</file>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit c53298b

Please sign in to comment.