chore(deps-dev): bump postcss from 8.5.14 to 8.5.18 in the npm_and_yarn group across 1 directory #682
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CI Workflow | |
| # Purpose: Execute full linting, static analysis, and unit tests for pushes and pull requests. | |
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f | |
| # uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: composer- | |
| - name: Install PHP dependencies | |
| run: composer install --no-interaction | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | |
| # uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install JS dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run auto-fix | |
| run: | | |
| pnpm run format || true | |
| pnpm run lint:fix || true | |
| pnpm run stylelint:fix || true | |
| composer run phpfix || true | |
| - name: Run static analysis | |
| env: | |
| ESLINT_USE_FLAT_CONFIG: "false" | |
| run: | | |
| echo "📊 Checking for remaining linting issues..." | |
| pnpm run lint:js || echo "⚠️ JS manual fixes needed" | |
| pnpm run lint:css || echo "⚠️ CSS manual fixes needed" | |
| composer run analyze || echo "⚠️ PHPStan manual fixes needed" | |
| echo "✅ Static analysis complete" | |
| - name: Check for auto-fixable changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| echo "📝 No auto-fixable changes detected" | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| echo "📝 Auto-fixable changes detected:" | |
| git diff --stat | |
| fi | |
| - name: Commit fixes (PR only) | |
| uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 | |
| # uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "style: auto-fix linting issues" | |
| branch: ${{ github.head_ref }} | |
| if: github.event_name == 'pull_request' && steps.check-changes.outputs.changed == 'true' | |
| - name: Branch protection notice | |
| if: github.event_name != 'pull_request' && steps.check-changes.outputs.changed == 'true' | |
| run: | | |
| echo "⚠️ Auto-fixable changes detected but cannot auto-commit to protected branch" | |
| echo "📝 Run 'pnpm run fix' locally and commit manually" | |
| echo "🔒 Branch protection rules prevent direct commits to main" | |
| - name: Run PHP unit tests | |
| run: composer run test:unit || echo "⚠️ Unit tests failed or not configured" |