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/performance.yml

    r56660 r56926  
    3232env:
    3333  # Performance testing should be performed in an environment reflecting a standard production environment.
    34   WP_DEBUG: false
    35   SCRIPT_DEBUG: false
    36   SAVEQUERIES : false
    37   WP_DEVELOPMENT_MODE: ''
     34  LOCAL_WP_DEBUG: false
     35  LOCAL_SCRIPT_DEBUG: false
     36  LOCAL_SAVEQUERIES: false
     37  LOCAL_WP_DEVELOPMENT_MODE: "''"
    3838
    3939  # This workflow takes two sets of measurements — one for the current commit,
     
    5757  # - Log debug information.
    5858  # - Install npm dependencies.
     59  # - Install Playwright browsers.
    5960  # - Build WordPress.
    6061  # - Start Docker environment.
     
    7475  # - Print target performance tests results.
    7576  # - Reset to original commit.
     77  # - Install npm dependencies.
    7678  # - Set the environment to the baseline version.
    7779  # - Run baseline performance tests.
     
    120122        run: npm ci
    121123
     124      - name: Install Playwright browsers
     125        run: npx playwright install --with-deps
     126
    122127      - name: Build WordPress
    123128        run: npm run build
     
    183188
    184189      - name: Run target performance tests (base/previous commit)
    185         run: npm run test:performance -- --prefix=before
     190        env:
     191          TEST_RESULTS_PREFIX: before
     192        run: npm run test:performance
    186193
    187194      - name: Print target performance tests results
    188         run: node ./tests/performance/results.js --prefix=before
     195        env:
     196          TEST_RESULTS_PREFIX: before
     197        run: node ./tests/performance/results.js
    189198
    190199      - name: Reset to original commit
    191200        run: git reset --hard $GITHUB_SHA
    192201
     202      - name: Install npm dependencies
     203        run: npm ci
     204
    193205      - name: Set the environment to the baseline version
    194206        run: |
     
    197209
    198210      - name: Run baseline performance tests
    199         run: npm run test:performance -- --prefix=base
     211        env:
     212          TEST_RESULTS_PREFIX: base
     213        run: npm run test:performance
    200214
    201215      - name: Print baseline performance tests results
    202         run: node ./tests/performance/results.js --prefix=base
     216        env:
     217          TEST_RESULTS_PREFIX: base
     218        run: node ./tests/performance/results.js
    203219
    204220      - name: Compare results with base
Note: See TracChangeset for help on using the changeset viewer.