refactor(hooks): split useLlm into model / generation / streaming hooks #125
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: core-repo-health | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| jobs: | ||
| repo-sanity-static: | ||
| name: Core Sanity + Static Gates | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Run core sanity and static gates | ||
| run: pnpm run health:repo:checks && pnpm run health:repo:static | ||
| frontend-tests: | ||
| name: Frontend Unit + Coverage | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Run frontend unit health lane | ||
| run: pnpm run health:repo:frontend | ||
| - name: Run coverage | ||
| run: pnpm test:coverage | ||
| - name: Upload frontend coverage | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | ||
| with: | ||
| name: coverage-frontend | ||
| path: coverage/frontend | ||
| if-no-files-found: error | ||
| retention-days: 14 | ||
| ui-regression: | ||
| name: UI Smoke + Visual + A11y + Responsive | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Install Playwright browser | ||
| run: pnpm exec playwright install --with-deps chromium | ||
| - name: Run UI regression health lane | ||
| run: pnpm run health:repo:ui | ||
| - name: Upload Playwright report | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | ||
| with: | ||
| name: playwright-report | ||
| path: | | ||
| playwright-report | ||
| test-results | ||
| if-no-files-found: ignore | ||
| retention-days: 14 | ||
| backend-tests: | ||
| name: Rust Backend + Security Health | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Install system dependencies | ||
| run: brew install protobuf pkgconf cmake | ||
| - name: Prepare frontend dist stub | ||
| run: | | ||
| mkdir -p dist | ||
| printf '<!doctype html><html><head><meta charset="utf-8"></head><body></body></html>\n' > dist/index.html | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | ||
| with: | ||
| toolchain: stable | ||
| - name: Run backend health lane | ||
| run: pnpm run health:repo:backend | ||
| search-api-tests: | ||
| name: Search API Health | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| postgres: | ||
| image: postgres:16 | ||
| env: | ||
| POSTGRES_USER: assistsupport_ci | ||
| POSTGRES_PASSWORD: assistsupport_ci | ||
| POSTGRES_DB: assistsupport_ci | ||
| ports: | ||
| - 5432:5432 | ||
| options: >- | ||
| --health-cmd "pg_isready -U assistsupport_ci -d assistsupport_ci" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| env: | ||
| ASSISTSUPPORT_DB_HOST: 127.0.0.1 | ||
| ASSISTSUPPORT_DB_PORT: "5432" | ||
| ASSISTSUPPORT_DB_USER: assistsupport_ci | ||
| ASSISTSUPPORT_DB_PASSWORD: assistsupport_ci | ||
| ASSISTSUPPORT_DB_NAME: assistsupport_ci | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install redis | ||
| run: sudo apt-get update && sudo apt-get install -y redis-server | ||
| - name: Start redis service | ||
| run: sudo service redis-server start | ||
| - name: Install Search API test dependencies | ||
| working-directory: search-api | ||
| run: | | ||
| python -m venv venv | ||
| source venv/bin/activate | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt -r requirements-test.txt | ||
| - name: Run Search API health lane | ||
| run: pnpm run health:repo:search | ||
| - name: Validate production runtime config | ||
| working-directory: search-api | ||
| env: | ||
| ENVIRONMENT: production | ||
| ASSISTSUPPORT_API_KEY: ci-test-key | ||
| ASSISTSUPPORT_SEARCH_API_REQUIRE_AUTH: "1" | ||
| ASSISTSUPPORT_RATE_LIMIT_STORAGE_URI: redis://127.0.0.1:6379/0 | ||
| run: | | ||
| source venv/bin/activate | ||
| python validate_runtime.py --check-backends --json | ||
| - name: Run production smoke check | ||
| working-directory: search-api | ||
| env: | ||
| ENVIRONMENT: production | ||
| ASSISTSUPPORT_API_KEY: ci-test-key | ||
| ASSISTSUPPORT_SEARCH_API_REQUIRE_AUTH: "1" | ||
| ASSISTSUPPORT_RATE_LIMIT_STORAGE_URI: redis://127.0.0.1:6379/0 | ||
| run: | | ||
| source venv/bin/activate | ||
| python smoke_search_api.py | ||
| - name: Verify checked-in OpenAPI contract | ||
| working-directory: search-api | ||
| run: | | ||
| source venv/bin/activate | ||
| python generate_openapi.py > /tmp/assistsupport-search-openapi.json | ||
| diff -u ../openapi/openapi.generated.json /tmp/assistsupport-search-openapi.json | ||
| security-audit: | ||
| name: Dependency Security Audit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install frontend dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Run pnpm audit | ||
| run: pnpm audit --audit-level high | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | ||
| with: | ||
| toolchain: stable | ||
| - name: Install cargo-audit | ||
| uses: taiki-e/install-action@1929cdef3ca26202efbfbb4719c58ecf43e84097 | ||
| - name: Run cargo audit | ||
| run: pnpm run test:security:audit:rust | ||
| - name: Setup Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install pip-audit | ||
| run: python -m pip install --upgrade pip pip-audit | ||
| - name: Run pip audit | ||
| run: pnpm run test:security:audit:python | ||
| build: | ||
| name: Build (macOS) | ||
| needs: | ||
| - frontend-static | ||
| - frontend-tests | ||
| - ui-regression | ||
| - backend-tests | ||
| - search-api-tests | ||
| - security-audit | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| - name: Install system dependencies | ||
| run: brew install protobuf pkgconf cmake | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c | ||
| with: | ||
| version: 10.28.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | ||
| with: | ||
| node-version: "20" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | ||
| with: | ||
| toolchain: stable | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Build frontend | ||
| run: pnpm run build | ||
| - name: Build Tauri app | ||
| run: pnpm tauri build | ||