From 6ff2a7fa1efcc2e09c7f3f9e149c04bf5488ecc3 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 31 Jan 2024 11:07:16 +0100 Subject: [PATCH 1/4] ci: Streamline browser integration tests on CI This does two things: 1. Only run webkit tests for the full bundle & esm tests (no need to run this for every variation...) 2. Shard the ESM tests for better parallelization --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eda494c77698..cc22661fa3db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -591,6 +591,16 @@ jobs: - bundle_tracing_es6_min - bundle_tracing_replay_es6 - bundle_tracing_replay_es6_min + project: + - chromium + include: + # Only check all projects for esm & full bundle + - bundle: bundle_tracing_replay_es6_min + project: '' + - bundle: esm + project: '' + # We also shard the ESM tests as they take the longest + shard: [1,2] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -628,9 +638,8 @@ jobs: - name: Run Playwright tests env: PW_BUNDLE: ${{ matrix.bundle }} - run: | - cd dev-packages/browser-integration-tests - yarn test:ci + working-directory: dev-packages/browser-integration-tests + run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/2', matrix.shard) || '' }} job_browser_loader_tests: name: Playwright Loader (${{ matrix.bundle }}) Tests From 423931e6023e5a3e57892033f1cd0065090bb208 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 31 Jan 2024 11:26:32 +0100 Subject: [PATCH 2/4] fix sharding --- .github/workflows/build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc22661fa3db..4dda170a5ff2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -569,7 +569,7 @@ jobs: yarn test:integration job_browser_playwright_tests: - name: Playwright (${{ matrix.bundle }}) Tests + name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/3') || ''}}) Tests needs: [job_get_metadata, job_build] if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request' runs-on: ubuntu-20.04-large-js @@ -595,12 +595,23 @@ jobs: - chromium include: # Only check all projects for esm & full bundle + # We also shard the ESM tests as they take the longest - bundle: bundle_tracing_replay_es6_min project: '' - bundle: esm project: '' - # We also shard the ESM tests as they take the longest - shard: [1,2] + shard: 1 + - bundle: esm + shard: 2 + - bundle: esm + project: '' + shard: 3 + exclude: + # Do not run the default chromium-only tests + - bundle: bundle_tracing_replay_es6_min + project: 'chromium' + - bundle: esm + project: 'chromium' steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -639,7 +650,7 @@ jobs: env: PW_BUNDLE: ${{ matrix.bundle }} working-directory: dev-packages/browser-integration-tests - run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/2', matrix.shard) || '' }} + run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/3', matrix.shard) || '' }} job_browser_loader_tests: name: Playwright Loader (${{ matrix.bundle }}) Tests From d51e55ea8912b00fc06d9c471a8e8b7de41e32e5 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 31 Jan 2024 11:36:19 +0100 Subject: [PATCH 3/4] fix job name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dda170a5ff2..4b90f5798fb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -569,7 +569,7 @@ jobs: yarn test:integration job_browser_playwright_tests: - name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/3') || ''}}) Tests + name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/3', matrix.shard) || ''}}) Tests needs: [job_get_metadata, job_build] if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request' runs-on: ubuntu-20.04-large-js From 3fe1ffe4f2554a236c98e263ea5222eab62c217e Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 31 Jan 2024 11:47:42 +0100 Subject: [PATCH 4/4] shard bundle tests too --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b90f5798fb4..b1f974dad511 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -569,7 +569,7 @@ jobs: yarn test:integration job_browser_playwright_tests: - name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/3', matrix.shard) || ''}}) Tests + name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests needs: [job_get_metadata, job_build] if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request' runs-on: ubuntu-20.04-large-js @@ -595,17 +595,26 @@ jobs: - chromium include: # Only check all projects for esm & full bundle - # We also shard the ESM tests as they take the longest + # We also shard the tests as they take the longest - bundle: bundle_tracing_replay_es6_min project: '' + shard: 1 + shards: 2 + - bundle: bundle_tracing_replay_es6_min + project: '' + shard: 2 + shards: 2 - bundle: esm project: '' shard: 1 + shards: 3 - bundle: esm shard: 2 + shards: 3 - bundle: esm project: '' shard: 3 + shards: 3 exclude: # Do not run the default chromium-only tests - bundle: bundle_tracing_replay_es6_min @@ -650,7 +659,7 @@ jobs: env: PW_BUNDLE: ${{ matrix.bundle }} working-directory: dev-packages/browser-integration-tests - run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/3', matrix.shard) || '' }} + run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }} job_browser_loader_tests: name: Playwright Loader (${{ matrix.bundle }}) Tests