✨ feat: refactor to speed up send message in server mode #25077
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
# Package tests - using each package's own test script | |
test-intenral-packages: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [file-loaders, prompts, model-runtime, web-crawler, electron-server-ipc, utils] | |
name: Test package ${{ matrix.package }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ secrets.BUN_VERSION }} | |
- name: Install deps | |
run: bun i | |
- name: Test ${{ matrix.package }} package with coverage | |
run: bun run --filter @lobechat/${{ matrix.package }} test:coverage | |
- name: Upload ${{ matrix.package }} coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./packages/${{ matrix.package }}/coverage/lcov.info | |
flags: packages/${{ matrix.package }} | |
test-packages: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [model-bank] | |
name: Test package ${{ matrix.package }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ secrets.BUN_VERSION }} | |
- name: Install deps | |
run: bun i | |
- name: Test ${{ matrix.package }} package with coverage | |
run: bun run --filter ${{ matrix.package }} test:coverage | |
- name: Upload ${{ matrix.package }} coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./packages/${{ matrix.package }}/coverage/lcov.info | |
flags: packages/${{ matrix.package }} | |
# App tests | |
test-website: | |
name: Test Website | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ secrets.BUN_VERSION }} | |
- name: Install deps | |
run: bun i | |
- name: Test App Coverage | |
run: bun run test-app:coverage | |
- name: Upload App Coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/app/lcov.info | |
flags: app | |
test-databsae: | |
name: Test Database | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: paradedb/paradedb:latest | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ secrets.BUN_VERSION }} | |
- name: Install deps | |
run: bun i | |
- name: Lint | |
run: bun run lint | |
- name: Test Client DB | |
run: bun run --filter @lobechat/database test:client-db | |
env: | |
KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s= | |
S3_PUBLIC_DOMAIN: https://example.com | |
APP_URL: https://home.com | |
- name: Test Coverage | |
run: bun run --filter @lobechat/database test:coverage | |
env: | |
DATABASE_TEST_URL: postgresql://postgres:postgres@localhost:5432/postgres | |
DATABASE_DRIVER: node | |
NEXT_PUBLIC_SERVICE_MODE: server | |
KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s= | |
S3_PUBLIC_DOMAIN: https://example.com | |
APP_URL: https://home.com | |
- name: Upload Database coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./packages/database/coverage/lcov.info | |
flags: database |