Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Merge pull request #660 from WordPress/fix/post-formats #1725

Merge pull request #660 from WordPress/fix/post-formats

Merge pull request #660 from WordPress/fix/post-formats #1725

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/[email protected]
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/[email protected]
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