Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

📒 ci: Upload Per-Test Jest Results From Review Workflows (#16110)

Danny Avilaba44443fdb23
diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.yml
index 6271abc91f..82d0088cdc 100644
--- a/.github/workflows/backend-review.yml
+++ b/.github/workflows/backend-review.yml
@@ -433,7 +433,9 @@ jobs:
- name: Run unit tests (shard ${{ matrix.shard }}/3)
env:
SELECTED: ${{ needs.codegraph_select.outputs.api_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-api-${{ matrix.shard }}.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
cd api
# A selected path can be stale in exactly two ways at this checkout (Codex P2, #15145 r6):
# deleted on the branch — dropped, which matches full CI (the file runs nowhere) — or
@@ -448,14 +450,26 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci -- --shard=${{ matrix.shard }}/3
+ npm run test:ci -- --shard=${{ matrix.shard }}/3 $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --shard=${{ matrix.shard }}/3 --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --shard=${{ matrix.shard }}/3 --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci -- --shard=${{ matrix.shard }}/3
+ npm run test:ci -- --shard=${{ matrix.shard }}/3 $JEST_JSON
fi
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-api-${{ matrix.shard }}
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
test-data-provider:
name: 'Tests: data-provider'
@@ -509,7 +523,9 @@ jobs:
- name: Run unit tests
env:
SELECTED: ${{ needs.codegraph_select.outputs.dataprovider_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-data-provider.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
cd packages/data-provider
if [ -n "$SELECTED" ]; then
KEEP=""
@@ -519,14 +535,26 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
fi
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-data-provider
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
test-data-schemas:
name: 'Tests: data-schemas'
@@ -586,7 +614,9 @@ jobs:
- name: Run unit tests
env:
SELECTED: ${{ needs.codegraph_select.outputs.dataschemas_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-data-schemas.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
cd packages/data-schemas
if [ -n "$SELECTED" ]; then
KEEP=""
@@ -596,14 +626,26 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
fi
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-data-schemas
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
test-packages-api:
name: 'Tests: @librechat/api (shard ${{ matrix.shard }}/4)'
@@ -677,7 +719,9 @@ jobs:
- name: Run unit tests (shard ${{ matrix.shard }}/4)
env:
SELECTED: ${{ needs.codegraph_select.outputs.pkgapi_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-packages-api-${{ matrix.shard }}.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
cd packages/api
if [ -n "$SELECTED" ]; then
KEEP=""
@@ -687,11 +731,23 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci -- --shard=${{ matrix.shard }}/4
+ npm run test:ci -- --shard=${{ matrix.shard }}/4 $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --shard=${{ matrix.shard }}/4 --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --shard=${{ matrix.shard }}/4 --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci -- --shard=${{ matrix.shard }}/4
+ npm run test:ci -- --shard=${{ matrix.shard }}/4 $JEST_JSON
fi
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-packages-api-${{ matrix.shard }}
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
diff --git a/.github/workflows/frontend-review.yml b/.github/workflows/frontend-review.yml
index 8fec3bac4c..40ebe5b722 100644
--- a/.github/workflows/frontend-review.yml
+++ b/.github/workflows/frontend-review.yml
@@ -304,7 +304,9 @@ jobs:
- name: Run unit tests
env:
SELECTED: ${{ needs.codegraph_select.outputs.clientpkg_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-packages-client.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
# A selected path can be stale in exactly two ways at this checkout (Codex P2, #15145 r6):
# deleted on the branch — dropped, which matches full CI (the file runs nowhere) — or
# renamed, where the NEW path is a changed test file and is selected independently. If
@@ -318,15 +320,27 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci
+ npm run test:ci -- $JEST_JSON
fi
working-directory: packages/client
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-packages-client
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
test-ubuntu:
name: 'Tests: Ubuntu (shard ${{ matrix.shard }}/2)'
@@ -378,7 +392,9 @@ jobs:
- name: Run unit tests (shard ${{ matrix.shard }}/2)
env:
SELECTED: ${{ needs.codegraph_select.outputs.client_files }}
+ JEST_JSON: --json --outputFile=${{ github.workspace }}/jest-results/jest-results-client-${{ matrix.shard }}.json
run: |
+ mkdir -p "$GITHUB_WORKSPACE/jest-results"
if [ -n "$SELECTED" ]; then
KEEP=""
for f in $SELECTED; do
@@ -387,15 +403,27 @@ jobs:
KEEP="${KEEP# }"
if [ -z "$KEEP" ]; then
echo "no selected test file exists at HEAD (stale selection); running FULL"
- npm run test:ci -- --shard=${{ matrix.shard }}/2
+ npm run test:ci -- --shard=${{ matrix.shard }}/2 $JEST_JSON
else
echo "codegraph: $(echo $KEEP | wc -w) selected test files (safe mode)"
- npm run test:ci -- --shard=${{ matrix.shard }}/2 --passWithNoTests --runTestsByPath $KEEP
+ npm run test:ci -- --shard=${{ matrix.shard }}/2 --passWithNoTests --runTestsByPath $KEEP $JEST_JSON
fi
else
- npm run test:ci -- --shard=${{ matrix.shard }}/2
+ npm run test:ci -- --shard=${{ matrix.shard }}/2 $JEST_JSON
fi
working-directory: client
+ # Per-test results keyed by head SHA (run.head_sha), for the codegraph test-evidence feed.
+ # Never part of the gate: it cannot fail the job, and a re-run overwrites its own artifact.
+ - name: Upload Jest results
+ if: ${{ !cancelled() }}
+ continue-on-error: true
+ uses: actions/upload-artifact@v6
+ with:
+ name: jest-results-client-${{ matrix.shard }}
+ path: jest-results/
+ retention-days: 7
+ if-no-files-found: ignore
+ overwrite: true
build-verify:
name: Vite build verification