Skip to content

Commit ee8694b

Browse files
committed
Merge branch 'trunk' into fix/focus-ring-outline-80138
2 parents b4e83b0 + 72d2a0e commit ee8694b

78 files changed

Lines changed: 1592 additions & 399 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/end2end-test.yml‎

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,52 @@ concurrency:
2020
permissions: {}
2121

2222
jobs:
23+
# Analyzes the list of files modified in a pull request to detect any changes that could
24+
# potentially impact E2E tests. A series of ignore patterns are used in place of an include
25+
# list to ensure tests run even if the list of filters happens to become stale.
26+
detect-relevant-changes:
27+
name: Detect changes relevant to E2E tests
28+
runs-on: 'ubuntu-24.04'
29+
timeout-minutes: 5
30+
permissions:
31+
pull-requests: read
32+
outputs:
33+
relevant: ${{ steps.filter.outputs.relevant }}
34+
steps:
35+
- name: Check for changes that may impact E2E test results
36+
id: filter
37+
if: ${{ github.event_name == 'pull_request' }}
38+
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
39+
with:
40+
predicate-quantifier: 'every'
41+
filters: |
42+
relevant:
43+
# Start from every file, then exclude what cannot change a test result.
44+
- '**'
45+
# Documentation.
46+
- '!**/*.md'
47+
- '!{backport-changelog,docs,phpunit,storybook}/**'
48+
# Other test suites, which cannot affect this one.
49+
- '!test/{integration,performance,php,storybook-playwright,unit}/**'
50+
- '!{packages,tools}/**/{test,tests}/**'
51+
# Development tooling and its configuration.
52+
- '!packages/{create-block,docgen,eslint-plugin,jest-*,npm-package-json-lint-config,prettier-config,project-management-automation,stylelint-config}/**'
53+
- '!tools/{docs,eslint,stylelint,validation}/**'
54+
- '!{eslint,lint-staged,prettier,syncpack}.config*'
55+
- '!{phpcs,phpunit}*'
56+
# Repository metadata.
57+
- '!{changelog,readme}.txt'
58+
- '!.{editorconfig,gitignore,prettierrc*,stylelintrc*}'
59+
# Other workflows, and everything under .github that this one does not use.
60+
- '!.github/{*,!(workflows|setup-node|setup-playwright)/**,workflows/!(end2end-test.yml)}'
61+
2362
build:
2463
name: Build
2564
runs-on: ${{ vars.RUNNERS_NAME || 'ubuntu-24.04' }}
65+
needs: [detect-relevant-changes]
2666
permissions:
2767
contents: read
28-
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
68+
if: ${{ ( github.repository == 'WordPress/gutenberg' && github.event_name != 'pull_request' ) || ( github.event_name == 'pull_request' && needs.detect-relevant-changes.outputs.relevant == 'true' ) }}
2969
timeout-minutes: 30
3070

3171
steps:
@@ -211,8 +251,13 @@ jobs:
211251

212252
merge-artifacts:
213253
name: Merge Artifacts
214-
if: ${{ !cancelled() }}
215-
needs: [e2e-playwright, e2e-playwright-rtc-websocket]
254+
if: ${{ ! cancelled() && ( github.event_name != 'pull_request' || needs.detect-relevant-changes.outputs.relevant == 'true' ) }}
255+
needs:
256+
[
257+
detect-relevant-changes,
258+
e2e-playwright,
259+
e2e-playwright-rtc-websocket,
260+
]
216261
runs-on: 'ubuntu-24.04'
217262
permissions:
218263
contents: read
@@ -331,3 +376,41 @@ jobs:
331376
body-path: pr-meta/body.md
332377
commit-sha: ${{ github.event.pull_request.head.sha }}
333378
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
379+
380+
# Runs on every event so it can serve as the workflow's only required status check while the
381+
# preceding jobs are path-filtered away.
382+
#
383+
# GitHub Actions can only be configured as required status checks on a per job basis using the
384+
# job's `name`. When the `name` changes PRs are temporarily blocked from being merged until
385+
# a privileged user can update the status checks, a process which is also error prone.
386+
#
387+
# The script reads every job in the run, so `needs` is only about waiting: it must cover
388+
# every job that would otherwise still be running when the script looks. `--ignore` then
389+
# names the jobs whose results do not count. Here that is this job itself, and the
390+
# housekeeping that runs alongside it.
391+
e2e-status-check:
392+
name: End-to-End Tests - Status Check
393+
runs-on: 'ubuntu-24.04'
394+
timeout-minutes: 5
395+
permissions:
396+
contents: read
397+
actions: read
398+
needs:
399+
[
400+
detect-relevant-changes,
401+
e2e-playwright,
402+
e2e-playwright-rtc-websocket,
403+
]
404+
if: ${{ ! cancelled() && ( github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' ) }}
405+
steps:
406+
- name: Checkout repository
407+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
408+
with:
409+
sparse-checkout: .github/workflows/scripts
410+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
411+
persist-credentials: false
412+
413+
- name: Check for any failures of required jobs
414+
env:
415+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
416+
run: node .github/workflows/scripts/ci-status-check.js --ignore 'End-to-End Tests - Status Check,Merge Artifacts,Update PR meta comment'

‎.github/workflows/performance.yml‎

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,57 @@ concurrency:
2828
permissions: {}
2929

3030
jobs:
31+
# Analyzes the list of files modified in a pull request to detect any changes that could
32+
# potentially impact performance metrics. A series of ignore patterns are used in place of
33+
# an include list to ensure tests run even if the list of filters happens to become stale.
34+
detect-relevant-changes:
35+
name: Detect changes relevant to performance testing
36+
runs-on: 'ubuntu-24.04'
37+
timeout-minutes: 5
38+
permissions:
39+
pull-requests: read
40+
outputs:
41+
relevant: ${{ steps.filter.outputs.relevant }}
42+
steps:
43+
- name: Check for changes that may impact performance metrics
44+
id: filter
45+
if: ${{ github.event_name == 'pull_request' }}
46+
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
47+
with:
48+
predicate-quantifier: 'every'
49+
filters: |
50+
relevant:
51+
# Start from every file, then exclude what cannot change a performance result.
52+
- '**'
53+
# Documentation and schemas.
54+
- '!**/*.md'
55+
- '!{backport-changelog,docs,phpunit,schemas,storybook,typings}/**'
56+
# Other test suites, which cannot affect the measurements.
57+
- '!test/{integration,php,storybook-playwright,unit}/**'
58+
- '!test/e2e/{*,!(assets)/**}'
59+
- '!{packages,tools}/**/{test,tests}/**'
60+
# Development tooling and its configuration.
61+
- '!packages/{create-block,docgen,eslint-plugin,jest-*,npm-package-json-lint-config,prettier-config,project-management-automation,stylelint-config}/**'
62+
# The mu-plugins and plugins below it load at run time, so they still count.
63+
- '!packages/e2e-tests/{*,!(mu-plugins|plugins)/**}'
64+
- '!tools/{docs,eslint,stylelint,validation}/**'
65+
- '!{eslint,lint-staged,prettier,syncpack}.config*'
66+
- '!{phpcs,phpunit}*'
67+
# Repository metadata.
68+
- '!{changelog,readme}.txt'
69+
- '!.{editorconfig,gitignore,prettierrc*,stylelintrc*}'
70+
# Other workflows, and everything under .github that this one does not use.
71+
- '!.github/{*,!(workflows|setup-node)/**,workflows/!(performance.yml)}'
72+
3173
prepare:
3274
timeout-minutes: 5
3375
name: Resolve branches to compare
3476
runs-on: ${{ vars.RUNNERS_NAME || 'ubuntu-24.04' }}
77+
needs: [detect-relevant-changes]
3578
permissions:
3679
contents: read
3780
actions: read
38-
if: ${{ github.repository == 'WordPress/gutenberg' }}
81+
if: ${{ github.repository == 'WordPress/gutenberg' && ( github.event_name != 'pull_request' || needs.detect-relevant-changes.outputs.relevant == 'true' ) }}
3982
outputs:
4083
# See tools/release/resolve-performance-branches.mjs for the shapes.
4184
# Falls back to the unresolved branches when the reuse lookup fails.
@@ -418,3 +461,36 @@ jobs:
418461
body-path: pr-meta/body.md
419462
commit-sha: ${{ github.event.pull_request.head.sha }}
420463
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
464+
465+
# Runs on every event so it can serve as the workflow's only required status check while the
466+
# preceding jobs are path-filtered away.
467+
#
468+
# GitHub Actions can only be configured as required status checks on a per job basis using the
469+
# job's `name`. When the `name` changes PRs are temporarily blocked from being merged until
470+
# a privileged user can update the status checks, a process which is also error prone.
471+
#
472+
# The script reads every job in the run, so `needs` is only about waiting: it must cover
473+
# every job that would otherwise still be running when the script looks. `--ignore` then
474+
# names the jobs whose results do not count. Here that is this job itself, and the
475+
# housekeeping that runs alongside it.
476+
performance-status-check:
477+
name: Performance Tests - Status Check
478+
runs-on: 'ubuntu-24.04'
479+
timeout-minutes: 5
480+
permissions:
481+
contents: read
482+
actions: read
483+
needs: [detect-relevant-changes, results]
484+
if: ${{ ! cancelled() && github.repository == 'WordPress/gutenberg' }}
485+
steps:
486+
- name: Checkout repository
487+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
488+
with:
489+
sparse-checkout: .github/workflows/scripts
490+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
491+
persist-credentials: false
492+
493+
- name: Check for any failures of required jobs
494+
env:
495+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
496+
run: node .github/workflows/scripts/ci-status-check.js --ignore 'Performance Tests - Status Check,Update PR meta comment'

0 commit comments

Comments
 (0)