From 6390b5283312768b1937e98e0df6b6d5579d37ab Mon Sep 17 00:00:00 2001 From: "Jorge A. Torres" Date: Thu, 17 Sep 2020 16:53:17 -0300 Subject: [PATCH 1/2] Configure phpcs --- phpcs.xml.dist | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index ec9ab6c63..c028d19f9 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -18,4 +18,11 @@ tests/ + + + . + + */node_modules/* + */vendor/* + ./tests/* From f2b4cc6effa6e652402ce16389b6eb67494380d1 Mon Sep 17 00:00:00 2001 From: "Jorge A. Torres" Date: Thu, 17 Sep 2020 16:53:23 -0300 Subject: [PATCH 2/2] Add Travis integration --- .travis.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8618f5438 --- /dev/null +++ b/.travis.yml @@ -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