mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-15 18:55:07 +03:00
d67c707027
Installing the frontend dependencies makes the onnxruntime-node package download its GPU binaries from GitHub releases, and the whole install fails whenever that download times out. Neither the frontend build nor the Docker image uses those binaries (the image only ships the built frontend), so the Docker build, the frontend CI and building the Python package now skip that download with ONNXRUNTIME_NODE_INSTALL_CUDA=skip. The regular CPU binaries are part of the npm package and are not affected.
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Frontend CI — Lint, format check, build, and unit tests
|
|
# Runs on pushes and PRs to main/dev, skipping backend-only changes
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
name: Frontend Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
paths-ignore: ['backend/**', 'pyproject.toml', 'uv.lock']
|
|
pull_request:
|
|
branches: [main, dev]
|
|
paths-ignore: ['backend/**', 'pyproject.toml', 'uv.lock']
|
|
|
|
concurrency:
|
|
group: frontend-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
ONNXRUNTIME_NODE_INSTALL_CUDA: skip
|
|
|
|
jobs:
|
|
# ── Format, i18n, and production build ────────────────────────────────────
|
|
format-and-build:
|
|
name: Format & Build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v5.1.0
|
|
|
|
- uses: actions/setup-node@v5.0.0
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
run: npm install --force
|
|
|
|
- name: Verify code formatting
|
|
run: npm run format
|
|
|
|
- name: Verify i18n strings
|
|
run: npm run i18n:parse
|
|
|
|
- name: Ensure working tree is clean
|
|
run: git diff --exit-code
|
|
|
|
- name: Production build
|
|
run: npm run build
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=8192
|
|
|
|
# ── Vitest unit tests ────────────────────────────────────────────────────
|
|
unit-tests:
|
|
name: Unit Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v5.1.0
|
|
|
|
- uses: actions/setup-node@v5.0.0
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies (frozen lockfile)
|
|
run: npm ci --force
|
|
|
|
- name: Execute test suite
|
|
run: npm run test:frontend
|