Update props-bot-action to the latest trunk commit (#540) #1209
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: | |
| pull_request: | |
| branches: [trunk] | |
| push: | |
| branches: [trunk] | |
| # Allow manually triggering the workflow | |
| workflow_dispatch: | |
| # Cancels all previous workflow runs for pull requests that have not completed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| # Disable permissions for all available scopes by default | |
| permissions: {} | |
| jobs: | |
| test: | |
| name: E2E - WP ${{ matrix.wp }} / Shard ${{ matrix.shard }}/4 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| event: ['${{ github.event_name }}'] | |
| shard: [1, 2, 3, 4] | |
| wp: ['6.2', '6.9', 'latest', 'trunk'] | |
| exclude: | |
| # On PRs: Skip minimum supported WP version for faster feedback | |
| - event: 'pull_request' | |
| wp: '6.2' | |
| env: | |
| WP_ENV_CORE: ${{ matrix.wp == 'trunk' && 'WordPress/WordPress' || (matrix.wp != 'latest' && format('WordPress/WordPress#{0}', matrix.wp) || null) }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Get Node.js version | |
| id: node-version | |
| run: | | |
| echo "NODE_VERSION=$(node -v)" >> "$GITHUB_OUTPUT" | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| composer install --prefer-dist --no-progress | |
| - name: Build plugin assets | |
| run: npm run build | |
| - name: Start wp-env | |
| run: npm run wp-env start | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| - name: Run E2E tests | |
| run: npm run test:e2e -- --shard=${{ matrix.shard }}/4 | |
| - name: Archive debug artifacts (screenshots, traces) | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: failures-artifacts--node${{ steps.node-version.outputs.NODE_VERSION }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} | |
| path: artifacts/test-results | |
| if-no-files-found: ignore | |
| - name: Archive blob reports (HTML) | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: blob-reports--node${{ steps.node-version.outputs.NODE_VERSION }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} | |
| path: blob-report | |
| if-no-files-found: ignore | |
| - name: Stop wp-env | |
| if: always() | |
| run: npm run wp-env stop | |
| local-json-multisite: | |
| name: Local JSON Multisite Integration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| composer install --prefer-dist --no-progress | |
| - name: Run Local JSON multisite integration | |
| run: npm run test:integration:local-json-multisite | |
| merge-artifacts: | |
| name: Merge Artifacts | |
| if: ${{ !cancelled() }} | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Merge failures artifacts | |
| uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| continue-on-error: true | |
| with: | |
| name: failures-artifacts | |
| pattern: failures-artifacts--* | |
| delete-merged: true | |
| - name: Merge blob reports | |
| uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| continue-on-error: true | |
| with: | |
| name: blob-reports-merged | |
| pattern: blob-reports--* | |
| delete-merged: true | |
| - name: Download merged blob reports | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| continue-on-error: true | |
| with: | |
| name: blob-reports-merged | |
| path: all-blob-reports | |
| - name: Merge blob reports into HTML report | |
| run: npx playwright merge-reports --reporter html ./all-blob-reports | |
| continue-on-error: true | |
| - name: Upload merged HTML report | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| continue-on-error: true | |
| with: | |
| name: html-report--attempt-${{ github.run_attempt }} | |
| path: playwright-report | |
| if-no-files-found: ignore |