mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 11:48:42 +02:00
* ci: split mobile lint/typecheck out of frontend job Mobile lint (~38s) + typecheck (~13s) ran on every web/desktop PR even though mobile has no vitest suite and main CLAUDE.md already promises a parallel mobile-verify workflow. Excluding @multica/mobile from the frontend turbo filter pulls those 50s off the critical path, and the new mobile-verify.yml runs them in parallel only when apps/mobile/** or packages/core/types/** changes. MUL-2729 Co-authored-by: multica-agent <github@multica.ai> * ci(mobile-verify): broaden path filter to cover real mobile deps The initial filter only watched `apps/mobile/**` and `packages/core/types/**`, but mobile imports runtime modules from many more `@multica/core/*` paths (agents, markdown, permissions, api/schemas, etc.). PRs that touched only those subtrees would skip main CI (via `--filter='!@multica/mobile'`) AND skip Mobile Verify — a coverage regression vs. the pre-split CI. Expand paths to: - `packages/core/**` (covers every importable subpath) - root install/turbo configs that affect mobile build: `package.json`, `pnpm-lock.yaml`, `pnpm-workspace.yaml`, `turbo.json` Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: J <j@multica.ai> Co-authored-by: multica-agent <github@multica.ai>
119 lines
3.6 KiB
YAML
119 lines
3.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Test self-host env derivation
|
|
run: bash scripts/selfhost-config.test.sh
|
|
|
|
- name: Verify reserved-slugs.ts is up to date
|
|
# Re-runs the generator and fails on any drift from the
|
|
# checked-in TypeScript output. The Go side embeds the JSON
|
|
# source directly, so a passing diff here proves both sides
|
|
# share one source of truth.
|
|
run: |
|
|
pnpm generate:reserved-slugs
|
|
git diff --exit-code -- packages/core/paths/reserved-slugs.ts
|
|
|
|
- name: Build, type check, lint, and test
|
|
# Mobile lives in a parallel mobile-verify workflow (path-filtered
|
|
# to apps/mobile/** + packages/core/types/**) so it doesn't add
|
|
# ~50s of expo-lint + tsc to every web/desktop PR. Keep this
|
|
# filter in sync with the root package.json scripts, which also
|
|
# exclude @multica/mobile.
|
|
run: pnpm exec turbo build typecheck lint test --filter='!@multica/docs' --filter='!@multica/mobile'
|
|
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg17
|
|
env:
|
|
POSTGRES_DB: multica
|
|
POSTGRES_USER: multica
|
|
POSTGRES_PASSWORD: multica
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd "pg_isready -U multica -d multica"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 20
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- 6379:6379
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
env:
|
|
DATABASE_URL: postgres://multica:multica@localhost:5432/multica?sslmode=disable
|
|
# Wires up the RedisLocalSkill*_test.go suite. Distinct from REDIS_URL
|
|
# (which would flip the server binary itself onto the Redis-backed
|
|
# realtime relay + request stores); the tests talk to this Redis
|
|
# directly so they run alongside the Postgres-backed suite.
|
|
REDIS_TEST_URL: redis://localhost:6379/1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.26.1"
|
|
cache-dependency-path: server/go.sum
|
|
|
|
- name: Build
|
|
run: cd server && go build ./...
|
|
|
|
- name: Run migrations
|
|
run: cd server && go run ./cmd/migrate up
|
|
|
|
- name: Test
|
|
run: cd server && go test ./...
|
|
|
|
installer:
|
|
# Stub-driven shell tests for scripts/install.sh. Kept off the heavy
|
|
# backend job so installer regressions surface independently, and
|
|
# exercised on macOS too because the installer targets macOS/Homebrew
|
|
# and `tar` / `sed` / `mktemp` differ between BSD and GNU userlands.
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Test shell installers
|
|
run: bash scripts/install.test.sh
|