Files
Lucas WintherandClaude Opus 5.5 4942461f79 Add typecheck + CI checks, light theme with self-hosted Inter, fix real-model test
- Typecheck: typescript 7 devDependency, `bun run typecheck`; CI gains a
  `check` stage (install, typecheck, fast tests) gating image builds (D-038).
- Light theme: every colour is a token; prefers-color-scheme: light
  overrides them. Inter Variable self-hosted from @fontsource-variable/inter,
  kept out of Bun's CSS inlining and precached (scripts/fonts.ts, D-037).
  Backend select no longer overflows on narrow phones.
- tests/live-real-model.test.ts: time budget scales with clip length and
  en_alien gets a measured WER bar; it had failed since July (D-039).
- Delete the temporary isolate_wer2.ts; fix icon "not checked in" comments
  and the README's model-weights location.
- Agent docs: branch naming, typecheck, CI, Bun CSS gotcha, permissions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 20:52:13 +01:00

72 lines
2.8 KiB
YAML

stages:
- check
- build
# Typecheck + the fast test suite gate the image build. The real-model
# accuracy test (tests/live-real-model.test.ts) is excluded: it downloads
# ~600 MB of Whisper weights and runs for many minutes on CPU.
check:
stage: check
image: oven/bun:1
script:
- bun install --frozen-lockfile
- bun run typecheck
- bun test --path-ignore-patterns='tests/live-real-model.test.ts'
rules:
- if: $CI_COMMIT_BRANCH
# Builds BOTH production image flavors (see Dockerfile) and pushes them to this
# project's GitLab Container Registry:
# - default target `runtime` → :<sha> / :latest (Bun-only)
# - target `with-server-engine` → :<sha>-server-engine /
# :latest-server-engine (+ python3 / faster-whisper)
#
# docker run -p 3000:3000 -v whisper-data:/app/data $CI_REGISTRY_IMAGE:latest
# docker run -p 3000:3000 -v whisper-data:/app/data $CI_REGISTRY_IMAGE:latest-server-engine
build-image:
stage: build
image: docker:27
services:
- docker:27-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
IMAGE_SHA_FW: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-server-engine
IMAGE_LATEST_FW: $CI_REGISTRY_IMAGE:latest-server-engine
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
script:
- docker build --pull -t "$IMAGE_SHA" .
# Fully tag + push this image (including :latest) before building
# with-server-engine below. That build shares almost all layers with this
# one (it extends the runtime stage), and building a second image sharing
# content with an already-tagged one is a known containerd-image-store/
# buildx bug where the earlier tag's local reference can stop resolving
# ("tag does not exist" on push) — see moby/moby#52897 and
# docker/setup-buildx-action#116. Finishing all push/tag work on this
# image first closes that window.
- |
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
docker tag "$IMAGE_SHA" "$IMAGE_LATEST"
fi
- docker push "$IMAGE_SHA"
- |
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
docker push "$IMAGE_LATEST"
fi
# with-server-engine extends the runtime stage, so this build reuses every
# layer from the one above and only adds the python/faster-whisper layer.
- docker build --target with-server-engine -t "$IMAGE_SHA_FW" .
- |
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
docker tag "$IMAGE_SHA_FW" "$IMAGE_LATEST_FW"
fi
- docker push "$IMAGE_SHA_FW"
- |
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
docker push "$IMAGE_LATEST_FW"
fi
rules:
- if: $CI_COMMIT_BRANCH