From e5418dd054250a89ca76387fe22ca49d26914e6c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 15 Jan 2021 22:34:41 +0100 Subject: [PATCH] [ticket/16687] Add check stylesheet with stylelint to github workflow PHPBB3-16687 --- .github/check-stylesheet.sh | 18 ++++++++++++++++++ .github/workflows/tests.yml | 4 ++++ 2 files changed, 22 insertions(+) create mode 100755 .github/check-stylesheet.sh diff --git a/.github/check-stylesheet.sh b/.github/check-stylesheet.sh new file mode 100755 index 0000000000..f5984a24ce --- /dev/null +++ b/.github/check-stylesheet.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @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 + +sudo npm install -g > /dev/null +npm install > /dev/null +set -x +node_modules/stylelint/bin/stylelint.js "phpBB/styles/prosilver/theme/*.css" +node_modules/stylelint/bin/stylelint.js "phpBB/adm/style/*.css" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index efb0934f0a..a4b05b3be3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,6 +80,10 @@ jobs: run: | .github/check-executable-files.sh ./ + - name: Check stylesheets + run: | + .github/check-stylesheet.sh + - name: Check commit message env: BRANCH: ${{ github.event.pull_request.base.sha }}