Skip to content

Further action update and force install grunt #60

Further action update and force install grunt

Further action update and force install grunt #60

name: Coding Standards
on:
push:
branches:
- main
pull_request:
jobs:
phpcs:
name: PHP coding standards
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--no-progress --no-ansi --no-interaction"
- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
- name: Log debug information
run: |
php --version
composer --version
phpcs -i
- name: Run PHPCS
run: phpcs -q -n --report=checkstyle | cs2pr
jshint:
name: JavaScript coding standards
runs-on: ubuntu-latest
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 14
- name: Cache NodeJS modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Dependencies
run: npx install-changed --install-command="npm ci"
- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
- name: Install grunt globally
run: npm install -g grunt-cli
- name: Log debug information
run: |
npm --version
node --version
php --version
composer --version
grunt --version
- name: Run JSHint
run: grunt jshint:core
- name: Run ESLint
run: grunt eslint:core