[codex] Fix front-end admin bar sudo deactivation #216
Workflow file for this run
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
| name: E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| e2e-tests: | |
| name: "E2E Tests" | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Patch wp-env for Composer audit compatibility | |
| run: node bin/patch-wp-env.js | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Start WordPress environment | |
| run: npx wp-env start | |
| - name: Wait for WordPress to be ready | |
| run: | | |
| for i in $(seq 1 30); do | |
| if curl -s -o /dev/null -w "%{http_code}" http://localhost:8889/wp-login.php | grep -q "200"; then | |
| echo "WordPress is ready" | |
| break | |
| fi | |
| echo "Waiting for WordPress... (attempt $i)" | |
| sleep 2 | |
| done | |
| - name: Assert pinned WordPress beta version | |
| run: npm run env:assert-wp-version | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| - name: Upload Playwright report on failure | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: | | |
| playwright-report/ | |
| tests/e2e/artifacts/test-results/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: Stop WordPress environment | |
| if: always() | |
| run: npx wp-env stop |