9e8f1bbeed
Dashboard / frontend (push) Failing after 0s
Dashboard / api (push) Failing after 0s
Lint PowerShell / powershell-lint (ubuntu-latest) (push) Failing after 1s
Python Lint / Lint Python with Ruff (push) Failing after 1s
ShellCheck / Lint shell scripts (push) Failing after 1s
Matrix Smoke / linux-smoke (push) Failing after 1s
Matrix Smoke / distro: cachyos (push) Failing after 15s
Matrix Smoke / distro: linux-mint-21.3 (push) Failing after 15s
Matrix Smoke / distro: debian-12 (push) Failing after 5m21s
Matrix Smoke / distro: fedora-41 (push) Failing after 4m56s
Matrix Smoke / distro: ubuntu-24.04 (push) Failing after 2m13s
Matrix Smoke / distro: rocky-9 (push) Failing after 10m39s
Matrix Smoke / distro: manjaro (push) Failing after 12m11s
Matrix Smoke / distro: opensuse-tw (push) Failing after 11m53s
Matrix Smoke / distro: archlinux (push) Failing after 20m3s
Matrix Smoke / distro: ubuntu-22.04 (push) Failing after 13m49s
Validate .env Schema / tier-1-env-validation (push) Successful in 52s
Validate .env Schema / tier-2-env-validation (push) Successful in 44s
Validate .env Schema / tier-3-env-validation (push) Successful in 52s
Validate .env Schema / tier-4-env-validation (push) Successful in 51s
Validate Extensions Catalog / Check catalog is up-to-date (push) Failing after 9m47s
Secret Scan / Scan for secrets (push) Failing after 21m4s
Validate Docker Compose / Validate Docker Compose files (push) Has been cancelled
Python Type Check / Type check with mypy (push) Has been cancelled
Validate .env Schema / tier-0-env-validation (push) Has been cancelled
Test Linux / integration-smoke (push) Has been cancelled
Lint PowerShell / powershell-lint (windows-latest) (push) Has been cancelled
Matrix Smoke / macos-smoke (push) Has been cancelled
84 lines
3.7 KiB
Bash
Executable File
84 lines
3.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# ODS Small Model Fallback Test Suite
|
|
# Tests the instant-start UX with a small GGUF model via llama-server
|
|
|
|
set -e
|
|
|
|
ODS_DIR="${ODS_DIR:-$(dirname "$(dirname "$(realpath "$0")")")}"
|
|
cd "$ODS_DIR"
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
pass() { echo -e "${GREEN}✓ PASS${NC}: $1"; }
|
|
fail() { echo -e "${RED}✗ FAIL${NC}: $1"; exit 1; }
|
|
info() { echo -e "${YELLOW}→${NC} $1"; }
|
|
|
|
echo "═══════════════════════════════════════════════════════════════"
|
|
echo " ODS Small Model Fallback Test Suite"
|
|
echo "═══════════════════════════════════════════════════════════════"
|
|
echo ""
|
|
|
|
# ===== Test 1: Compose files exist =====
|
|
info "Test 1: Checking compose files..."
|
|
if [[ ! -f "docker-compose.yml" ]] && [[ ! -f "docker-compose.base.yml" ]]; then
|
|
fail "No compose file found (docker-compose.yml or docker-compose.base.yml)"
|
|
fi
|
|
pass "Compose files present"
|
|
|
|
# ===== Test 2: Compose is valid =====
|
|
info "Test 2: Validating compose..."
|
|
# Try docker compose (plugin) first, then docker-compose (standalone)
|
|
if command -v docker &> /dev/null && docker compose version &> /dev/null 2>&1; then
|
|
docker compose -f docker-compose.yml config > /dev/null 2>&1 || fail "Invalid compose configuration"
|
|
elif command -v docker-compose &> /dev/null; then
|
|
docker-compose -f docker-compose.yml config > /dev/null 2>&1 || fail "Invalid compose configuration"
|
|
else
|
|
info "Docker/docker-compose not available, skipping compose validation"
|
|
fi
|
|
pass "Compose configuration valid (or skipped)"
|
|
|
|
# ===== Test 3: Small fallback model specified correctly =====
|
|
info "Test 3: Checking small model config..."
|
|
grep -qi "qwen2.5-1.5b-instruct" docker-compose.yml || info "Small fallback model not in main compose (may be configured at runtime)"
|
|
pass "Small model config checked"
|
|
|
|
# ===== Test 4: Upgrade script exists =====
|
|
info "Test 4: Checking upgrade script..."
|
|
[[ -f "scripts/upgrade-model.sh" ]] || fail "upgrade-model.sh not found"
|
|
[[ -x "scripts/upgrade-model.sh" ]] || fail "upgrade-model.sh not executable"
|
|
pass "Upgrade script ready"
|
|
|
|
# ===== Test 5: Healthcheck timing =====
|
|
info "Test 5: Checking healthcheck configuration..."
|
|
MAIN_START_PERIOD=$(grep -A10 "llama-server:" docker-compose.yml | grep -A5 "healthcheck:" | grep "start_period" | grep -oE '[0-9]+' | head -1 || echo "0")
|
|
if [[ "$MAIN_START_PERIOD" -gt 0 ]]; then
|
|
pass "llama-server healthcheck start_period configured ($MAIN_START_PERIOD)"
|
|
else
|
|
info "Could not parse healthcheck start_period (may use defaults)"
|
|
fi
|
|
|
|
# ===== Test 6: .env template has LLM_MODEL =====
|
|
info "Test 6: Checking .env template..."
|
|
if [[ -f ".env.example" ]]; then
|
|
grep -q "LLM_MODEL" .env.example || fail ".env.example missing LLM_MODEL"
|
|
pass ".env.example has LLM_MODEL setting"
|
|
else
|
|
info "Skipping .env.example check (file not present)"
|
|
fi
|
|
|
|
echo ""
|
|
echo "═══════════════════════════════════════════════════════════════"
|
|
echo -e " ${GREEN}All tests passed!${NC}"
|
|
echo "═══════════════════════════════════════════════════════════════"
|
|
echo ""
|
|
echo "To run with small fallback model:"
|
|
echo " LLM_MODEL=qwen2.5-1.5b-instruct docker compose up -d"
|
|
echo ""
|
|
echo "To upgrade to full model after download completes:"
|
|
echo " ./scripts/upgrade-model.sh"
|
|
echo ""
|