Skip to content

Commit 6155af5

Browse files
authored
ci: Streamline browser integration tests on CI (#10435)
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 tests for better parallelization
1 parent c51891b commit 6155af5

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ jobs:
569569
yarn test:integration
570570
571571
job_browser_playwright_tests:
572-
name: Playwright (${{ matrix.bundle }}) Tests
572+
name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests
573573
needs: [job_get_metadata, job_build]
574574
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
575575
runs-on: ubuntu-20.04-large-js
@@ -591,6 +591,36 @@ jobs:
591591
- bundle_tracing_es6_min
592592
- bundle_tracing_replay_es6
593593
- bundle_tracing_replay_es6_min
594+
project:
595+
- chromium
596+
include:
597+
# Only check all projects for esm & full bundle
598+
# We also shard the tests as they take the longest
599+
- bundle: bundle_tracing_replay_es6_min
600+
project: ''
601+
shard: 1
602+
shards: 2
603+
- bundle: bundle_tracing_replay_es6_min
604+
project: ''
605+
shard: 2
606+
shards: 2
607+
- bundle: esm
608+
project: ''
609+
shard: 1
610+
shards: 3
611+
- bundle: esm
612+
shard: 2
613+
shards: 3
614+
- bundle: esm
615+
project: ''
616+
shard: 3
617+
shards: 3
618+
exclude:
619+
# Do not run the default chromium-only tests
620+
- bundle: bundle_tracing_replay_es6_min
621+
project: 'chromium'
622+
- bundle: esm
623+
project: 'chromium'
594624

595625
steps:
596626
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -628,9 +658,8 @@ jobs:
628658
- name: Run Playwright tests
629659
env:
630660
PW_BUNDLE: ${{ matrix.bundle }}
631-
run: |
632-
cd dev-packages/browser-integration-tests
633-
yarn test:ci
661+
working-directory: dev-packages/browser-integration-tests
662+
run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }}
634663

635664
job_browser_loader_tests:
636665
name: Playwright Loader (${{ matrix.bundle }}) Tests

0 commit comments

Comments
 (0)