Skip to content

Merge pull request #110 from WordPress/try/typography-presets #6

Merge pull request #110 from WordPress/try/typography-presets

Merge pull request #110 from WordPress/try/typography-presets #6

Workflow file for this run

name: Code Quality
on:
pull_request:
push:
branches:
- trunk
# Cancel previous workflow run groups that have not completed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint-css:
name: "Lint: CSS"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3.4.1
with:
node-version-file: ".nvmrc"
cache: npm
- name: Install Node dependencies
run: npm ci
env:
CI: true
- name: Detect coding standard violations (stylelint)
run: npm run lint:css
lint-php:
name: "Lint: PHP"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
coverage: none
tools: cs2pr
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Configure Composer cache
uses: actions/cache@v3.0.6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction
- name: Validate composer.json
run: composer --no-interaction validate --no-check-all
- name: Detect coding standard violations (PHPCS)
run: composer run lint