Update E2E test workflows to use context names and server images and bump playwright workers to 10 (#36496)

* Update E2E test workflows to use context names and server images and bump playwright workers to 10

* refactor: update branch naming conventions in E2E test workflows for better aggregation
This commit is contained in:
sabril
2026-05-11 11:57:52 +08:00
committed by GitHub
parent e2700a961a
commit 52c400ed1f
5 changed files with 35 additions and 21 deletions
+10 -4
View File
@@ -283,10 +283,16 @@ The wrappers (`e2e-tests-cypress.yml`, `e2e-tests-playwright.yml`) accept these
| `ref_branch` | _(empty)_ | Source branch name for webhook messages (e.g., `master` or `release-11.4`) |
The automation dashboard branch name is derived from context:
- PR: `server-pr-<pr_number>` (e.g., `server-pr-35205`)
- Master merge: `server-master-<image_tag>` (e.g., `server-master-abc1234_def5678`)
- Release merge: `server-release-<version>-<image_tag>` (e.g., `server-release-11.4-abc1234_def5678`)
- Fallback: `server-commit-<image_tag>`
- PR: `pr-<pr_number>` (e.g., `pr-35205`)
- Master merge: `master`
- Release merge: `release-<version>` (e.g., `release-11.7`)
- Fallback: `commit-<short_sha>` (e.g., `commit-abc1234`)
Master and release runs use the real branch verbatim so the
`/reports/{repo}/{branch}` view aggregates every build on that branch
into one history. PR runs use a `pr-<n>` token because there's no real
branch to use; the commit-only fallback uses a `commit-<short_sha>`
token (defensive — no current caller hits this path).
The test type suffix (`-smoke` or `-full`) is appended by the template.
@@ -228,8 +228,8 @@ jobs:
cypress-sort-last: ${{ inputs.cypress_sort_last }}
post-pr-comment: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
test-type: ${{ inputs.test_type }}
server-edition: ${{ inputs.server_edition }}
context-name: ${{ inputs.context_name }}
server-image: ${{ env.SERVER_IMAGE }}
workers:
name: dispatch-run-${{ matrix.worker_index }}
@@ -334,14 +334,13 @@ jobs:
use-staging: ${{ vars.E2E_USE_STAGING_TEST_IO_URL != 'false' }}
composite-identity: ${{ needs.dispatch-begin.outputs.composite-identity-json }}
framework: cypress
test-type: ${{ inputs.test_type }}
report-type: ${{ inputs.report_type }}
image-tag: ${{ inputs.server_image_tag }}
image-aliases: ${{ inputs.server_image_aliases }}
server-image: ${{ env.SERVER_IMAGE }}
pr-number: ${{ inputs.pr_number }}
ref-branch: ${{ inputs.ref_branch }}
server-edition: ${{ inputs.server_edition }}
context-name: ${{ inputs.context_name }}
post-pr-comment: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: ci/publish-webhook
+9 -4
View File
@@ -99,14 +99,19 @@ jobs:
fi
echo "server_image_tag=${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
# Generate branch name
# Generate branch name. For master/release runs we pass the real
# ref_branch through verbatim (`master`, `release-11.7`) so the
# dashboard's /reports/{repo}/{branch} grouping aggregates every
# build on that branch instead of treating each image tag as its
# own "branch". PR and commit-only fallback paths keep their
# synthetic prefix because there's no real branch to use.
REF_BRANCH="${{ inputs.ref_branch }}"
if [ -n "$PR_NUMBER" ]; then
echo "branch=server-pr-${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "branch=pr-${PR_NUMBER}" >> $GITHUB_OUTPUT
elif [ -n "$REF_BRANCH" ]; then
echo "branch=server-${REF_BRANCH}-${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
echo "branch=${REF_BRANCH}" >> $GITHUB_OUTPUT
else
echo "branch=server-commit-${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
echo "branch=commit-${COMMIT_SHA::7}" >> $GITHUB_OUTPUT
fi
# Determine server image name
@@ -188,8 +188,8 @@ jobs:
playwright-project: ${{ inputs.playwright_project }}
post-pr-comment: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
test-type: full
server-edition: ${{ inputs.server_edition }}
context-name: ${{ inputs.context_name }}
server-image: ${{ env.SERVER_IMAGE }}
workers:
name: dispatch-run-${{ matrix.worker_index }}
@@ -291,14 +291,13 @@ jobs:
use-staging: ${{ vars.E2E_USE_STAGING_TEST_IO_URL != 'false' }}
composite-identity: ${{ needs.dispatch-begin.outputs.composite-identity-json }}
framework: playwright
test-type: full
report-type: ${{ inputs.report_type }}
image-tag: ${{ inputs.server_image_tag }}
image-aliases: ${{ inputs.server_image_aliases }}
server-image: ${{ env.SERVER_IMAGE }}
pr-number: ${{ inputs.pr_number }}
ref-branch: ${{ inputs.ref_branch }}
server-edition: ${{ inputs.server_edition }}
context-name: ${{ inputs.context_name }}
post-pr-comment: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: ci/publish-webhook
+10 -5
View File
@@ -93,14 +93,19 @@ jobs:
fi
echo "server_image_tag=${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
# Generate branch name
# Generate branch name. For master/release runs we pass the real
# ref_branch through verbatim (`master`, `release-11.7`) so the
# dashboard's /reports/{repo}/{branch} grouping aggregates every
# build on that branch instead of treating each image tag as its
# own "branch". PR and commit-only fallback paths keep their
# synthetic prefix because there's no real branch to use.
REF_BRANCH="${{ inputs.ref_branch }}"
if [ -n "$PR_NUMBER" ]; then
echo "branch=server-pr-${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "branch=pr-${PR_NUMBER}" >> $GITHUB_OUTPUT
elif [ -n "$REF_BRANCH" ]; then
echo "branch=server-${REF_BRANCH}-${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
echo "branch=${REF_BRANCH}" >> $GITHUB_OUTPUT
else
echo "branch=server-commit-${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
echo "branch=commit-${COMMIT_SHA::7}" >> $GITHUB_OUTPUT
fi
# Determine server image name
@@ -208,7 +213,7 @@ jobs:
pull-requests: write
uses: ./.github/workflows/e2e-tests-playwright-template-v2.yml
with:
workers: 8
workers: 10
enabled_docker_services: "postgres inbucket"
commit_sha: ${{ inputs.commit_sha }}
branch: ${{ needs.generate-build-variables.outputs.branch }}