Browse Source

Update travis and install codesniffer.

pull/695/head
Jonathan Green 7 years ago
parent
commit
a6dca09a06
No known key found for this signature in database
GPG Key ID: E96938FA4DF26243
  1. 4
      .travis.yml
  2. 9
      tests/scripts/phpcs_setup.sh

4
.travis.yml

@ -38,7 +38,9 @@ branches:
- secure: "nTv2Zb/qKlECK+xE5ahbfXI9ZZbf2ZMd796q7oPlTxUwvu6nomHnUOjJATl6tq2cj23PyJ89Jlgl5cMZ5h0QMUzYpN5hPyY6oCJxWgFamFaE3bv5E/rBd1f6WVTJW7S4UKn8Mr9R2PrX+ZxQZGVIigAfR8VfhQuP8PcuO5eMLBk="
before_install:
- export ISLANDORA_DIR=$TRAVIS_BUILD_DIR
- export TOOLS_DIR=$HOME/tools/
- $TRAVIS_BUILD_DIR/tests/scripts/travis_setup.sh
- $TRAVIS_BUILD_DIR/tests/scripts/phpcs_setup.sh
- cd $HOME/drupal-*
before_script:
# Mysql might time out for long tests, increase the wait timeout.
@ -47,7 +49,7 @@ before_script:
script:
- ant -buildfile sites/all/modules/islandora/build.xml lint
- $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora
- drush coder-review --reviews=production,security,style,i18n,potx,sniffer islandora
- $TOOLS_DIR/vendor/bin/phpcs --standard=drupal --ignore=vendor,*.md,*.info,*.txt sites/all/modules/islandora
- phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora
- php scripts/run-tests.sh --php `phpenv which php` --url http://localhost:8081 --verbose "Islandora"
after_failure:

9
tests/scripts/phpcs_setup.sh

@ -0,0 +1,9 @@
#!/bin/bash
# Setup phpcs and drupal sniffs.
mkdir $TOOLS_DIR
cd $TOOLS_DIR
composer require drupal/coder
composer require dealerdirect/phpcodesniffer-composer-installer
$TOOLS_DIR/vendor/bin/phpcs -i
$TOOLS_DIR/vendor/bin/phpcs --version
Loading…
Cancel
Save