From e6d74ec047146bb05ce4d0d346eeeb691bbb6f59 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 30 Oct 2018 14:52:10 +0100 Subject: [PATCH] Updated travis (#251) Bring the travis.yml up to date with https://github.com/blackboard-open-source/moodle-plugin-ci/blob/master/.travis.dist.yml use grunt to validate js and css add validation of mustache, savepoints, allow javascript behat tests --- .travis.yml | 24 +++++++++++++++++------- verify_certificate.php | 1 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index dae0cbf..d86059f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,39 @@ language: php -sudo: false +# For javascript behat tests we need sudo +sudo: true cache: directories: - $HOME/.composer/cache + - $HOME/.npm php: - 7.0 - 7.2 addons: + firefox: 47.0.1 postgresql: 9.3 + apt: + packages: + - oracle-java8-installer + - oracle-java8-set-default env: global: - MOODLE_BRANCH=MOODLE_35_STABLE + - IGNORE_NAMES=mobile_*.mustache # Mobile mustache has specific syntax, ignore their templates matrix: - DB=pgsql - DB=mysqli before_install: - phpenv config-rm xdebug.ini + - nvm install 8.9 + - nvm use 8.9 - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^1 + - composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2 - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" install: @@ -32,11 +41,12 @@ install: script: - moodle-plugin-ci phplint + # - moodle-plugin-ci phpcpd # subplugins often have similar code and cause "duplicated code" errors + # - moodle-plugin-ci phpmd # too much noise from this check, maybe, some day... - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - moodle-plugin-ci validate + - moodle-plugin-ci savepoints + - moodle-plugin-ci mustache + - moodle-plugin-ci grunt -t stylelint:css -t js - moodle-plugin-ci phpunit - moodle-plugin-ci behat - diff --git a/verify_certificate.php b/verify_certificate.php index a3577cd..4f245be 100644 --- a/verify_certificate.php +++ b/verify_certificate.php @@ -22,6 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +// This file does not need require_login because capability to verify can be granted to guests, skip codechecker here. // @codingStandardsIgnoreLine require_once('../../config.php');