Fix E2E tests stability #195
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: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: WP ${{ matrix.wordpress }} / PHP ${{ matrix.php }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.2", "8.3", "8.4"] | |
| wordpress: ["6.7", "6.8"] | |
| steps: | |
| - name: Checkout plugin | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| - name: Install pnpm dependencies | |
| run: pnpm install | |
| - name: Set WordPress and PHP version override | |
| run: | | |
| echo '{ | |
| "core": "https://wordpress.org/wordpress-${{ matrix.wordpress }}.zip", | |
| "phpVersion": "${{ matrix.php }}" | |
| }' > .wp-env.override.json | |
| - name: Start wp-env | |
| run: pnpm exec wp-env start | |
| - name: Install Playwright browsers | |
| run: pnpm run tests:install | |
| - name: Run Playwright tests | |
| run: pnpm exec playwright test | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-results-php${{ matrix.php }}-wp${{ matrix.wordpress }} | |
| path: test-results | |
| retention-days: 30 |