diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 0000000..79890b5 --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,34 @@ +name: CI-Windows-WindowsServiceStatus + +on: + push: + branches: [ main, feat/windows-service-status-auto ] + pull_request: + branches: [ main, feat/windows-service-status-auto ] + +jobs: + build-test: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + distribution: "windows-hosted" + sdk: [5.0.x, 6.0.x] + - name: Restore NuGet packages + run: dotnet restore + - name: Build backend + run: dotnet build -c Release + - name: Run backend tests (Windows service tests) + run: dotnet test tests/CncService.Tests/CncService.Tests.csproj -c Release -v minimal --filter "FullyQualifiedName~WindowsServiceCheckerTests|DashboardServiceTests" + - name: Build frontend (optional, if frontend changes) + run: | + cd frontend + npm ci + npm run build + - name: Run frontend tests (optional) + if: always() + run: | + echo "Frontend test steps would run here (optional)" diff --git a/.sisyphus/plans/collector-start-status-enhancement-stage4.md b/.sisyphus/plans/collector-start-status-enhancement-stage4.md new file mode 100644 index 0000000..d465c18 --- /dev/null +++ b/.sisyphus/plans/collector-start-status-enhancement-stage4.md @@ -0,0 +1,29 @@ +## Phase 4 Plan: 前端适配与端到端测试草案 + +- 目标 + - 前端能正确展示后端新增的 serviceStatus 字段,并据此给出友好提示 + - 未安装时,启动按钮触发安装引导,显示 install.ps1 路径 + - 启动失败/异常时,显示服务返回的 serviceMessage 以及排查建议 + +- 变更范围 + - 前端:DashboardPage.vue、类型定义、相关 UI 文案 + - 后端:已完成阶段3,前端将调用 /api/admin/collector/status 实时获取状态 + - 测试:新增前端端到端测试用例草案 + +- 任务清单 + 1) 前端界面完善 + - 确保 serviceStatusLabel 的文本与图标覆盖 NotInstalled、Stopped、Running、Starting、StartFailed + - 在 NotInstalled 场景下,点击启动显示安装引导 + - 显示 serviceMessage(若返回)作为错误提示的一部分 + 2) 新字段的类型检查与绑定 + - 确认 CollectorStatus 类型字段包含 serviceStatus、serviceName、uptimeSeconds、lastCollectTime、serviceMessage + 3) 集成测试草案 + - 场景覆盖 NotInstalled、Running、Starting、StartFailed、Stopped + 4) 回归与文档 + - 更新用户手册和计划文档 + +- 验收标准 + - UI 正确显示 serviceStatus 的中文文本与图标 + - NotInstalled 时展示安装引导信息并提供 install.ps1 路径 + - 启动失败时能展示 API 返回的 serviceMessage + - 端到端测试覆盖率达到 80% 以上