mirror of
https://github.com/RayWangQvQ/BiliBiliToolPro.git
synced 2026-10-17 05:07:15 +08:00
70220dbc66
* upgrade to dotnet10
* adapt qinglong with dotnet10
* adapt baidu with dotnet10
* adapt daidai with dotnt10
* chore(deps): 升级 Serilog 包至与 .NET 10 对齐的最新稳定版
Serilog.AspNetCore 8.0.3→10.0.0,Serilog.Extensions.Hosting 8.0.0→10.0.0,
Serilog.Settings.Configuration 8.0.4→10.0.1。
* update
* chore(deps): Microsoft.Extensions/EFCore/AspNetCore 包升级至 10.0.12
补齐 dotnet10 升级遗漏的中央包版本:Serilog 10.x 依赖
Microsoft.Extensions.Logging >= 10.0.0,props 停留在 8.x 会导致
CI 干净还原时报 NU1605 包降级错误。同时移除已无引用的
Npgsql/EFCore.InMemory 等条目,AppAny.Quartz 迁移包升至 0.6.0。
* test: 恢复外部测试 Category=External 标记与 Characterization 串行集合
pull 合并时丢失了 27 个测试文件的单行改动:25 个依赖真实
cookie/webhook 的测试类缺少 [Trait("Category","External")],
导致 dotnet test --filter "Category!=External" 误跑外部测试;
两个 Characterization 测试类缺少 [Collection("Characterization")],
并发执行时静态 Global.ServiceProviderRoot 互相覆盖导致断言失败。
* fix(test): Sqlite 配置测试清理前清空连接池
Microsoft.Data.Sqlite 连接池在 Dispose 后仍持有文件句柄,
Windows 下删除临时库目录抛 IOException。
19 lines
865 B
PowerShell
19 lines
865 B
PowerShell
Set-Location ..
|
|
|
|
# 安装 ReportGenerator 工具
|
|
Write-Output "Installing ReportGenerator tool..."
|
|
dotnet tool install -g dotnet-reportgenerator-globaltool
|
|
|
|
# 运行单元测试并生成覆盖率报告
|
|
Write-Output "Running unit tests and generating coverage report..."
|
|
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./TestResults/coverage.opencover.xml
|
|
|
|
# 生成html报告
|
|
$coverageFiles = Get-ChildItem -Path . -Recurse -Filter "coverage.cobertura.xml"
|
|
$coverageFiles | ForEach-Object { Write-Output $_.FullName }
|
|
$reportPaths = ($coverageFiles | ForEach-Object { $_.FullName }) -join ";"
|
|
reportgenerator "-reports:$reportPaths" "-targetdir:coveragereport" -reporttypes:Html
|
|
|
|
# 检查生成的覆盖率报告文件是否存在
|
|
Write-Output "Coverage report generated successfully."
|
|
Start-Process "coveragereport/index.htm" |