LibreChat/.github/workflows/favorites-quality.yml
Danny Avila bd9108a87a
🧯 ci: Stop Diagnostic Artifact Uploads From Failing or Stalling Test Jobs (#18068)
On 2026-11-11 the artifact service answered every request with an HTML
page. In Playwright run 43092661470 eight memory shards failed in
"Upload Playwright HTML report" after retrying for 9 to 10.5 minutes;
in six of them every test had passed.

Uploads that no job downloads (Playwright reports, traces and
screenshots, the Lighthouse report, the advisory quality reports) are
now `continue-on-error` with a three minute step timeout, so a failed
upload stays out of the job result and a stalled one cannot run the job
into its own timeout. The Jest result uploads were already
`continue-on-error` and gain the same bound. Build outputs and mutation
shards that a later job downloads stay fatal.

merge-gate.test.mjs holds the gated workflows to that split, and
workflow.test.mts holds Change Quality to it.
2026-11-11 19:17:15 -05:00

94 lines
3.6 KiB
YAML

name: Database Contract Quality
on:
workflow_dispatch:
pull_request:
branches: [dev, canary]
paths:
- 'packages/data-schemas/src/contracts/*.ts'
- 'packages/data-schemas/src/methods/favorite*.ts'
- 'packages/data-schemas/src/methods/resourceLock*.ts'
- 'packages/data-schemas/src/models/resourceLock.ts'
- 'packages/data-schemas/src/schema/resourceLock.ts'
- 'packages/data-schemas/src/types/resourceLock.ts'
- 'packages/data-schemas/src/utils/retry.ts'
- 'packages/data-schemas/src/methods/index.ts'
- 'packages/data-schemas/src/models/favorite.ts'
- 'packages/data-schemas/src/schema/favorite.ts'
- 'packages/data-schemas/src/types/favorite.ts'
- 'packages/data-schemas/src/models/plugins/tenantIsolation.ts'
- 'packages/data-schemas/src/tenant/policy.ts'
- 'packages/data-schemas/src/config/tenantContext.ts'
- 'packages/data-schemas/src/index.ts'
- 'packages/data-schemas/package.json'
- 'packages/data-schemas/*config*'
- 'packages/data-schemas/jest.globalSetup.mjs'
- 'config/jest.*'
- 'scripts/crap*.mts'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/favorites-quality.yml'
- '.github/actions/mongodb-binary/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
contracts:
name: ${{ matrix.suite }}
strategy:
fail-fast: false
matrix:
suite: [favorites, leases]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '24.22.3'
cache: npm
- uses: actions/cache@v5
with:
path: |
node_modules
api/node_modules
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-24.22.3-${{ hashFiles('package-lock.json') }}
id: dependencies
- name: Install dependencies
if: steps.dependencies.outputs.cache-hit != 'true'
run: npm ci
- name: Build shared types
run: npm run build:data-provider
- name: Typecheck the advisory reporter
run: >-
npx --no-install tsc --noEmit --target ES2023 --module NodeNext
--moduleResolution NodeNext --allowImportingTsExtensions --skipLibCheck
--strict --types node scripts/crap.mts scripts/crap.test.mts
- name: Verify the advisory reporter
run: node --test scripts/crap.test.mts
- name: Provision MongoDB memory-server binary
uses: ./.github/actions/mongodb-binary
- name: Contracts, compatibility, and CRAP report
run: npm run test:quality:${{ matrix.suite }} --workspace packages/data-schemas
- name: Mutate the real database implementation
run: npm run test:mutations:${{ matrix.suite }} --workspace packages/data-schemas
# A debugging aid that no job downloads, so a failed or stalled upload must not fail the
# contracts: see the note on the e2e_shards uploads in playwright-mock.yml.
- name: Upload advisory reports
if: always()
timeout-minutes: 3
continue-on-error: true
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.suite }}-quality-${{ github.sha }}
path: packages/data-schemas/coverage/${{ matrix.suite }}/
if-no-files-found: warn
retention-days: 14