Skip to content

Lint

Lint #28

Workflow file for this run

name: Lint
on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches: [main]
jobs:
csscomb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.15.1"
- run: |
npm init -y
npm install csscomb --global
csscomb ./**
phpcs:
runs-on: ubuntu-latest
needs: csscomb
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
coverage: none
tools: composer, cs2pr
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup cache
uses: pat-s/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Run phpcs
run: |
composer self-update --1
composer install
vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
vendor/bin/phpcs --standard=Wordpress --ignore=3rdparty,onlyoffice-wordpress-block,admin/js,onlyoffice-tinymce/*.js,vendor,wpcs ./