Skip to content

Document the real Spoken Audio Node migration state, and fix the CI that hid it #256

Document the real Spoken Audio Node migration state, and fix the CI that hid it

Document the real Spoken Audio Node migration state, and fix the CI that hid it #256

Workflow file for this run

# CI Workflow
# Purpose: Execute full linting, static analysis, and integration 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@v2
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1
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@v4
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- 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 all linting with autofix
run: |
pnpm run format
pnpm run lint:js:fix || true
pnpm run lint:css:fix || true
composer run phpfix || true
- name: Check bundle sizes
run: pnpm run size-check
- name: Validate STAR/AIWA compliance
run: |
pnpm run i18n-check
grep -q "WordPress.*6\.4" starmus-audio-recorder.php || echo "⚠️ WordPress 6.4+ requirement not found"
grep -r "star-" src/ || echo "⚠️ STAR prefix not found in source"
- name: Run static analysis
run: |
echo "📊 Checking for remaining linting issues..."
pnpm run lint:js
pnpm run lint:css
composer run analyze
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@v5
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9
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 'npm run fix' locally and commit manually"
echo "🔒 Branch protection rules prevent direct commits to main"
- name: Start WordPress test environment
run: pnpm run env:start
- name: WordPress Integration Tests
run: pnpm run test:wp-env
- name: Stop WordPress test environment
run: pnpm run env:stop
- name: Install Playwright
run: pnpm exec playwright install --with-deps chromium
- name: E2E Tests (Offline & Accessibility)
run: |
pnpm run test:e2e
pnpm run test:a11y