From 1be84e0233266e9be70085196208dd8a464910d2 Mon Sep 17 00:00:00 2001 From: Marc Alexander <admin@m-a-styles.de> Date: Sun, 8 Jan 2017 14:36:30 +0100 Subject: [PATCH] [ticket/14970] Run stylelint on travis PHPBB3-14970 --- .travis.yml | 6 ++++++ travis/check-stylesheet.sh | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 travis/check-stylesheet.sh diff --git a/.travis.yml b/.travis.yml index 19251d6155..b48927b4ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,11 @@ matrix: - php: nightly fast_finish: true +addons: + apt: + sources: + - node + services: - redis-server @@ -46,6 +51,7 @@ script: - travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./ + - travis/check-stylesheet.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi" - sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh new file mode 100755 index 0000000000..aa1b4d7a6d --- /dev/null +++ b/travis/check-stylesheet.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited <https://www.phpbb.com> +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 + +if [ "$NOTESTS" == '1' ] +then + cd phpBB + npm install -g + npm install + stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" +fi