Make WordPress Core


Ignore:
Timestamp:
10/13/2023 08:11:41 AM (12 months ago)
Author:
swissspidy
Message:

Build/Test Tools: Migrate Puppeteer tests to Playwright.

As per the migration plan shared last year, this migrates all browser-based tests in WordPress core to use Playwright.
This includes end-to-end, performance, and visual regression tests.

Props swissspidy, mamaduka, kevin940726, bartkalisz, desrosj, adamsilverstein.
Fixes #59517.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/end-to-end-tests.yml

    r56538 r56926  
    4343  # - Logs debug information about the GitHub Action runner.
    4444  # - Installs npm dependencies.
     45  # - Install Playwright browsers.
    4546  # - Builds WordPress to run from the `build` directory.
    4647  # - Starts the WordPress Docker container.
     
    4849  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
    4950  # - Install WordPress within the Docker container.
     51  # - Install Gutenberg.
    5052  # - Run the E2E tests.
    5153  # - Ensures version-controlled files are not modified or deleted.
     
    9193        run: npm ci
    9294
     95      - name: Install Playwright browsers
     96        run: npx playwright install --with-deps
     97
    9398      - name: Build WordPress
    9499        run: npm run build
     
    116121        run: npm run env:install
    117122
     123      - name: Install Gutenberg
     124        run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
     125
    118126      - name: Run E2E tests
    119127        run: npm run test:e2e
     
    130138        run: git diff --exit-code
    131139
     140  slack-notifications:
     141    name: Slack Notifications
     142    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     143    permissions:
     144      actions: read
     145      contents: read
     146    needs: [ e2e-tests ]
     147    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     148    with:
     149      calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
     150    secrets:
     151      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     152      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     153      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     154      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     155
    132156  failed-workflow:
    133157    name: Failed workflow tasks
     
    142166      github.run_attempt < 2 &&
    143167      (
    144         needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
     168        contains( needs.*.result, 'cancelled' ) ||
     169        contains( needs.*.result, 'failure' )
    145170      )
    146171    steps:
Note: See TracChangeset for help on using the changeset viewer.