Fix false "unsaved changes" warning from Query Loop queryId churn on load #104
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: Playwright Tests | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master, develop] | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm i | |
| - name: Build plugin | |
| run: npm run build | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Start WordPress environment | |
| run: npm run wp-env start | |
| - name: Wait for WordPress to be ready | |
| run: | | |
| timeout 60 bash -c 'until curl -sSf http://localhost:8889 > /dev/null 2>&1; do sleep 2; done' || echo "WordPress may not be fully ready" | |
| sleep 5 | |
| - name: Debug - Check WordPress status | |
| run: | | |
| curl -I http://localhost:8889 || echo "WordPress not responding" | |
| docker ps | |
| - name: Run Playwright tests | |
| id: tests | |
| continue-on-error: true | |
| run: npm run test:e2e | |
| env: | |
| CI: true | |
| - name: Stop WordPress environment | |
| if: always() | |
| run: npm run wp-env stop | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: test-results/ | |
| retention-days: 30 | |
| if-no-files-found: ignore | |
| - name: Upload test videos and traces | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test-results | |
| path: test-results/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: Comment PR with test results | |
| uses: daun/playwright-report-comment@v3 | |
| if: always() && github.event_name == 'pull_request' | |
| with: | |
| report-file: test-results/results.json | |
| - name: Fail if tests failed | |
| if: steps.tests.outcome == 'failure' | |
| run: exit 1 |