Skip to content

chore(deps-dev): bump postcss from 8.5.14 to 8.5.18 in the npm_and_yarn group across 1 directory #289

chore(deps-dev): bump postcss from 8.5.14 to 8.5.18 in the npm_and_yarn group across 1 directory

chore(deps-dev): bump postcss from 8.5.14 to 8.5.18 in the npm_and_yarn group across 1 directory #289

Workflow file for this run

name: Code Quality & Auto-Fix
on:
push:
branches: [ universe, main ]
pull_request:
branches: [ universe, main ]
jobs:
php-quality:
name: PHP Code Quality
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install PHP dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run PHPCS
run: composer phpcs || true
- name: Run PHPStan
run: composer phpstan || true
- name: Run Rector (dry-run)
run: composer rector || true
js-quality:
name: JavaScript/CSS Code Quality
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 8.6.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- name: Run ESLint
env:
ESLINT_USE_FLAT_CONFIG: "false"
run: pnpm run lint:js || true
- name: Run Stylelint
run: pnpm run lint:css || true
auto-fix:
name: Auto-Fix Code Issues
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/universe'
needs: [php-quality, js-quality]
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f
with:
php-version: '8.3'
tools: composer:v2
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 8.6.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction
pnpm install --frozen-lockfile
- name: Run Rector fixes
run: composer rector:fix || true
- name: Run PHP CS Fixer
run: composer phpfix || true
- name: Run PHPCBF
run: composer phpcbf || true
- name: Run ESLint fixes
env:
ESLINT_USE_FLAT_CONFIG: "false"
run: pnpm run lint:fix || true
- name: Run Stylelint fixes
run: pnpm run stylelint:fix || true
- name: Run Prettier
run: pnpm run format || true
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3
with:
commit_message: "style: auto-fix code quality issues [skip ci]"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
branch: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
file_pattern: "src/**/*.php src/**/*.js src/**/*.css"