- 运行句柄按 run_id 归属,修复取消后重跑时闸门被旧运行删除的竞态 - 调度循环改用取消令牌退出,启动时对账遗留运行,校验 rows_affected - 三类任务统一参与调度,新增 /api/v1/stats 与 /api/v1/schedule - SQLite 启用 WAL 与 busy_timeout,日志清理跳过活跃文件,单行上限 256 KiB - 前端缓存管理令牌并在 403 时重试一次,仪表盘改用统计接口
43 lines
1.4 KiB
PowerShell
43 lines
1.4 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$projectRoot = Split-Path -Parent $PSScriptRoot
|
|
$scratch = Join-Path $projectRoot '.tmp'
|
|
|
|
function Assert-ExitCode {
|
|
param([string]$Step)
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "$Step failed with exit code $LASTEXITCODE"
|
|
}
|
|
}
|
|
|
|
# 测试统一使用仓库内的临时目录:不依赖系统 %TEMP% 的权限策略,
|
|
# 也让清理、归档和排障都留在项目目录里。
|
|
[void](New-Item -ItemType Directory -Path $scratch -Force)
|
|
$env:TMP = $scratch
|
|
$env:TEMP = $scratch
|
|
|
|
Push-Location $projectRoot
|
|
try {
|
|
pnpm --dir frontend lint
|
|
Assert-ExitCode 'Frontend lint'
|
|
pnpm --dir frontend typecheck
|
|
Assert-ExitCode 'Frontend typecheck'
|
|
pnpm --dir frontend test
|
|
Assert-ExitCode 'Frontend tests'
|
|
pnpm --dir frontend build
|
|
Assert-ExitCode 'Frontend build'
|
|
cargo fmt --manifest-path backend\Cargo.toml -- --check
|
|
Assert-ExitCode 'Rust formatting'
|
|
cargo clippy --manifest-path backend\Cargo.toml --all-targets -- -D warnings
|
|
Assert-ExitCode 'Rust clippy'
|
|
cargo test --manifest-path backend\Cargo.toml
|
|
Assert-ExitCode 'Rust tests'
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'e2e.ps1')
|
|
Assert-ExitCode 'Playwright end-to-end tests'
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
Remove-Item -LiteralPath $scratch -Recurse -Force -ErrorAction SilentlyContinue
|
|
}
|