Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: enable test runner sharding (#11006)

Nimar934ec5f94ddd
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index eafd176ec7..a5436ffbc9 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -248,9 +248,11 @@ jobs:
LANGFUSE_INIT_USER_NAME: "Demo User"
LANGFUSE_INIT_USER_PASSWORD: "password"
- name: run test-sync
- run: pnpm --filter=web run test-sync
+ working-directory: web
+ run: npx cross-env NODE_OPTIONS='--no-experimental-require-module' npx dotenv -e ../.env.test -e ../.env -- npx jest --verbose --runInBand --detectOpenHandles --selectProjects sync-server
- name: run test-client
- run: pnpm --filter=web run test-client
+ working-directory: web
+ run: npx cross-env NODE_OPTIONS='--no-experimental-require-module' npx dotenv -e ../.env.test -e ../.env -- npx jest --verbose --runInBand --detectOpenHandles --selectProjects client
tests-web-async:
timeout-minutes: 30
@@ -258,12 +260,13 @@ jobs:
needs:
- pre-job
if: needs.pre-job.outputs.should_skip != 'true'
- name: tests-web-async (node${{ matrix.node-version }}, pg${{ matrix.postgres-version }}, mode${{ matrix.deploy-mode }})
+ name: tests-web-async (node${{ matrix.node-version }}, pg${{ matrix.postgres-version }}, mode${{ matrix.deploy-mode }}, shard${{ matrix.shard }}/3)
strategy:
matrix:
node-version: [24]
postgres-version: [12, 15]
deploy-mode: ["", "-azure", "-redis-cluster"]
+ shard: [1, 2, 3]
steps:
- uses: actions/checkout@v4
- name: Install golang-migrate for Clickhouse migrations
@@ -302,8 +305,9 @@ jobs:
uses: actions/cache@v4
with:
path: .turbo
- key: ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-${{ github.sha }}
+ key: ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-shard${{ matrix.shard }}-${{ github.sha }}
restore-keys: |
+ ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-shard${{ matrix.shard }}-
${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-
${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-
${{ runner.os }}-turbo-
@@ -360,7 +364,8 @@ jobs:
LANGFUSE_INIT_USER_NAME: "Demo User"
LANGFUSE_INIT_USER_PASSWORD: "password"
- name: run tests
- run: pnpm --filter=web run test
+ working-directory: web
+ run: npx cross-env NODE_OPTIONS='--no-experimental-require-module' npx dotenv -e ../.env.test -e ../.env -- npx jest --verbose --runInBand --detectOpenHandles --selectProjects async-server --shard=${{ matrix.shard }}/3
tests-worker:
timeout-minutes: 20