Browse Source

Consolidating common checks into a single bash script to be called by all the other modules.

pull/700/head
Daniel Lamb 8 years ago
parent
commit
e8968b4712
  1. 6
      .travis.yml
  2. 15
      tests/scripts/travis_scripts.sh

6
.travis.yml

@ -43,12 +43,8 @@ before_install:
before_script: before_script:
# Mysql might time out for long tests, increase the wait timeout. # Mysql might time out for long tests, increase the wait timeout.
- mysql -e 'SET @@GLOBAL.wait_timeout=1200' - mysql -e 'SET @@GLOBAL.wait_timeout=1200'
script: script:
- find $TRAVIS_BUILD_DIR -type f \( -name '*.php' -o -name '*.inc' -o -name '*.module' -o -name '*.install' -o -name '*.test' \) -exec php -l {} \; - $ISLANDORA_DIR/tests/scripts/travis_script.sh sites/all/modules/islandora
- $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora
- drush coder-review --reviews=production,security,style,i18n,potx,sniffer 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" - php scripts/run-tests.sh --php `phpenv which php` --url http://localhost:8081 --verbose "Islandora"
after_failure: after_failure:
- $ISLANDORA_DIR/tests/scripts/travis_after_failure.sh - $ISLANDORA_DIR/tests/scripts/travis_after_failure.sh

15
tests/scripts/travis_scripts.sh

@ -0,0 +1,15 @@
#!/bin/bash
# Common checks to get run during the 'script' section in Travis.
# Lint
find $TRAVIS_BUILD_DIR -type f \( -name '*.php' -o -name '*.inc' -o -name '*.module' -o -name '*.install' -o -name '*.test' \) -exec php -l {} \;
# Check line endings
$ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora
# Coding standards
drush coder-review --reviews=production,security,style,i18n,potx,sniffer $TRAVIS_BUILD_DIR
# Copy/paste detection
phpcpd --names *.module,*.inc,*.test $TRAVIS_BUILD_DIR
Loading…
Cancel
Save