Skip to content

Commit

Permalink
Merge pull request #5 from woocommerce/add-travis-support
Browse files Browse the repository at this point in the history
Add travis support
  • Loading branch information
jorgeatorres authored Sep 17, 2020
2 parents 5e209cb + f2b4cc6 commit 96556d5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: php
os: linux
dist: xenial

notifications:
email: false

php:
- 7.0

branches:
only:
- master
- trunk

script: |
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $TRAVIS_COMMIT_RANGE | grep \\\\.php | awk '{print}' ORS=' '`
if [ "$CHANGED_FILES" != "" ]; then
composer global require woocommerce/woocommerce-sniffs --update-with-all-dependencies
.config/composer/vendor/bin/phpcs -p $CHANGED_FILES
fi
7 changes: 7 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@
<rule ref="PHPCompatibility">
<exclude-pattern>tests/</exclude-pattern>
</rule>

<arg name="extensions" value="php"/>
<file>.</file>

<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>./tests/*</exclude-pattern>
</ruleset>

0 comments on commit 96556d5

Please sign in to comment.