[ci] Shard playground tests

playwright also supports sharding tests. Let's see if we can get playground CI times down from 3-4 mins.
This commit is contained in:
Lauren Tan
2025-01-02 16:48:46 -05:00
parent 5b666f9c42
commit a9942dcaca
+8 -5
View File
@@ -23,8 +23,14 @@ defaults:
jobs:
playground:
name: Test playground
name: yarn test (Shard ${{ matrix.shard }})
runs-on: ubuntu-latest
strategy:
matrix:
shard:
- 1/3
- 2/3
- 3/3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
@@ -38,13 +44,10 @@ jobs:
with:
path: "**/node_modules"
key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
- name: yarn install compiler
run: yarn install --frozen-lockfile
working-directory: compiler
- name: yarn install playground
run: yarn install --frozen-lockfile
- run: npx playwright install --with-deps chromium
- run: CI=true yarn test
- run: CI=true yarn test --shard=${{ matrix.shard }}
- run: ls -R test-results
if: '!cancelled()'
- name: Archive test results