Update travis (#250)

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
This commit is contained in:
Marina Glancy 2018-10-30 14:52:10 +01:00 committed by Mark Nelson
parent 64e91c2716
commit ce4da8c1b2
2 changed files with 18 additions and 7 deletions

View file

@ -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_34_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

View file

@ -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');