forked from Rockachopa/Timmy-time-dashboard
feat: upgrade to qwen3.5, self-hosted Gitea CI, optimize Docker image
Model upgrade: - qwen2.5:14b → qwen3.5:latest across config, tools, and docs - Added qwen3.5 to multimodal model registry Self-hosted Gitea CI: - .gitea/workflows/tests.yml: lint + test jobs via act_runner - Unified Dockerfile: pre-baked deps from poetry.lock for fast CI - sitepackages=true in tox for ~2s dep resolution (was ~40s) - OLLAMA_URL set to dead port in CI to prevent real LLM calls Test isolation fixes: - Smoke test fixture mocks create_timmy (was hitting real Ollama) - WebSocket sends initial_state before joining broadcast pool (race fix) - Tests use settings.ollama_model/url instead of hardcoded values - skip_ci marker for Ollama-dependent tests, excluded in CI tox envs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
13
tox.ini
13
tox.ini
@@ -4,9 +4,12 @@ no_package = true
|
||||
|
||||
# ── Base ─────────────────────────────────────────────────────────────────────
|
||||
[testenv]
|
||||
allowlist_externals = timeout, perl, docker, mkdir, bash, grep
|
||||
allowlist_externals = timeout, perl, docker, mkdir, bash, grep, ruff, pytest, mypy, uvicorn
|
||||
sitepackages = true
|
||||
commands_pre = pip install -e ".[dev]" --quiet
|
||||
|
||||
passenv = OLLAMA_URL
|
||||
|
||||
setenv =
|
||||
TIMMY_TEST_MODE = 1
|
||||
TIMMY_DISABLE_CSRF = 1
|
||||
@@ -84,7 +87,7 @@ commands =
|
||||
# ── CI / Coverage ────────────────────────────────────────────────────────────
|
||||
|
||||
[testenv:ci]
|
||||
description = CI test suite with coverage + JUnit XML (mirrors GitHub Actions)
|
||||
description = CI test suite with coverage + JUnit XML (mirrors Gitea Actions)
|
||||
commands =
|
||||
mkdir -p reports
|
||||
pytest tests/ \
|
||||
@@ -94,7 +97,7 @@ commands =
|
||||
--cov-fail-under=73 \
|
||||
--junitxml=reports/junit.xml \
|
||||
-p no:xdist \
|
||||
-m "not ollama and not docker and not selenium and not external_api"
|
||||
-m "not ollama and not docker and not selenium and not external_api and not skip_ci"
|
||||
|
||||
[testenv:coverage]
|
||||
description = Full coverage report (terminal + XML)
|
||||
@@ -121,7 +124,7 @@ commands =
|
||||
# ── Pre-push (mirrors CI exactly) ────────────────────────────────────────────
|
||||
|
||||
[testenv:pre-push]
|
||||
description = Local gate — lint + full CI suite (same as GitHub Actions)
|
||||
description = Local gate — lint + full CI suite (same as Gitea Actions)
|
||||
deps =
|
||||
ruff>=0.8.0
|
||||
commands =
|
||||
@@ -136,7 +139,7 @@ commands =
|
||||
--cov-fail-under=73 \
|
||||
--junitxml=reports/junit.xml \
|
||||
-p no:xdist \
|
||||
-m "not ollama and not docker and not selenium and not external_api"
|
||||
-m "not ollama and not docker and not selenium and not external_api and not skip_ci"
|
||||
|
||||
# ── Pre-commit (fast local gate) ────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user