danny-avila--librechat
e115934061
Publish `@librechat/data-schemas` to NPM / pack (push) Failing after 8s
Publish `@librechat/client` to NPM / pack (push) Failing after 0s
GitNexus Index / index (push) Failing after 1s
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been skipped
Sync Helm Chart Tags / Sync chart tags (push) Failing after 2s
Publish `librechat-data-provider` to NPM / pack (push) Failing after 1s
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Failing after 1s
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Failing after 0s
Sync Helm Chart Tags / Ignore non-main push (push) Has been skipped
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Failing after 1s
Publish `@librechat/client` to NPM / publish-npm (push) Has been cancelled
Publish `librechat-data-provider` to NPM / publish-npm (push) Has been cancelled
GitNexus Index / post-index (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Has been cancelled
301 行
8.8 KiB
YAML
301 行
8.8 KiB
YAML
name: Frontend Unit Tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'client/**'
|
|
- 'packages/client/**'
|
|
- 'packages/data-provider/**'
|
|
- '.github/workflows/frontend-review.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build packages
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Restore data-provider build cache
|
|
id: cache-data-provider
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: packages/data-provider/dist
|
|
key: build-data-provider-${{ runner.os }}-${{ hashFiles('packages/data-provider/src/**', 'packages/data-provider/tsconfig*.json', 'packages/data-provider/tsdown.config.mjs', 'packages/data-provider/package.json') }}
|
|
|
|
- name: Build data-provider
|
|
if: steps.cache-data-provider.outputs.cache-hit != 'true'
|
|
run: npm run build:data-provider
|
|
|
|
- name: Restore client-package build cache
|
|
id: cache-client-package
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: packages/client/dist
|
|
key: build-client-package-${{ runner.os }}-${{ hashFiles('packages/client/src/**', 'packages/client/tsconfig*.json', 'packages/client/tsdown.config.mjs', 'packages/client/package.json', 'packages/data-provider/src/**', 'packages/data-provider/tsconfig*.json', 'packages/data-provider/tsdown.config.mjs', 'packages/data-provider/package.json') }}
|
|
|
|
- name: Build client-package
|
|
if: steps.cache-client-package.outputs.cache-hit != 'true'
|
|
run: npm run build:client-package
|
|
|
|
- name: Upload data-provider build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
retention-days: 2
|
|
|
|
- name: Upload client-package build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-client-package
|
|
path: packages/client/dist
|
|
retention-days: 2
|
|
|
|
typecheck:
|
|
name: TypeScript type checks (client)
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Download data-provider build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
|
|
- name: Download client-package build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-client-package
|
|
path: packages/client/dist
|
|
|
|
- name: Type check client
|
|
run: npm run typecheck
|
|
working-directory: client
|
|
|
|
test-packages-client:
|
|
name: 'Tests: @librechat/client'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Download data-provider build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
|
|
- name: Run unit tests
|
|
run: npm run test:ci
|
|
working-directory: packages/client
|
|
|
|
test-ubuntu:
|
|
name: 'Tests: Ubuntu (shard ${{ matrix.shard }}/4)'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Download data-provider build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
|
|
- name: Download client-package build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-client-package
|
|
path: packages/client/dist
|
|
|
|
- name: Run unit tests (shard ${{ matrix.shard }}/4)
|
|
run: npm run test:ci -- --shard=${{ matrix.shard }}/4
|
|
working-directory: client
|
|
|
|
test-windows:
|
|
name: 'Tests: Windows (shard ${{ matrix.shard }}/4)'
|
|
needs: build
|
|
runs-on: windows-latest
|
|
timeout-minutes: 20
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Download data-provider build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
|
|
- name: Download client-package build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-client-package
|
|
path: packages/client/dist
|
|
|
|
- name: Run unit tests (shard ${{ matrix.shard }}/4)
|
|
run: npm run test:ci -- --shard=${{ matrix.shard }}/4
|
|
working-directory: client
|
|
|
|
build-verify:
|
|
name: Vite build verification
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
client/node_modules
|
|
packages/client/node_modules
|
|
packages/data-provider/node_modules
|
|
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Download data-provider build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-data-provider
|
|
path: packages/data-provider/dist
|
|
|
|
- name: Download client-package build
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-client-package
|
|
path: packages/client/dist
|
|
|
|
- name: Build client
|
|
run: cd client && npm run build:ci
|