From a9942dcaca780f35e8b778807197cb8a2aa49ea8 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 2 Jan 2025 16:48:44 -0500 Subject: [PATCH] [ci] Shard playground tests playwright also supports sharding tests. Let's see if we can get playground CI times down from 3-4 mins. --- .github/workflows/compiler_playground.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compiler_playground.yml b/.github/workflows/compiler_playground.yml index 68d14a7661..67f7f3935d 100644 --- a/.github/workflows/compiler_playground.yml +++ b/.github/workflows/compiler_playground.yml @@ -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