diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ccb4dd9..939a2ae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,22 @@ version: 2 updates: # GitHub Actions 与 NuGet 依赖每周检查一次,自动开 PR。 + # 同一生态的更新合并为一个 PR,避免同族包(如 EF Core 各包)被拆开升级导致 CS1705。 - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + groups: + github-actions: + patterns: ["*"] - package-ecosystem: "nuget" directory: "/" schedule: interval: "weekly" + groups: + nuget: + patterns: ["*"] + ignore: + # 插件只编译期引用 Harmony,运行时用宿主 ClassIsland 自带的 0Harmony 2.4.2.0; + # 引用更高版本会让运行时请求不存在的程序集版本。跟随宿主升级时再手动调整。 + - dependency-name: "Lib.Harmony" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f2b945..a5519b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: run: dotnet build RemoteCI.slnx -c Release - name: 测试 run: dotnet test RemoteCI.slnx -c Release --no-build - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v7 with: node-version: "22" - name: 验证浏览器语音采集 @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: "17" @@ -89,7 +89,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: "17" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f22545f..b24cbc2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: "17" @@ -171,7 +171,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: "17" @@ -231,8 +231,8 @@ jobs: echo "version=$version" >> "$GITHUB_OUTPUT" echo "channel=$channel" >> "$GITHUB_OUTPUT" echo "prerelease=$prerelease" >> "$GITHUB_OUTPUT" - - uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@v4 + - uses: docker/setup-buildx-action@v4 - name: 登录 GHCR uses: docker/login-action@v4 with: @@ -240,7 +240,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: 构建并推送多架构镜像 - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . file: server/RemoteCI.Server/Dockerfile diff --git a/server/RemoteCI.Server/RemoteCI.Server.csproj b/server/RemoteCI.Server/RemoteCI.Server.csproj index 0edd200..8e5ab92 100644 --- a/server/RemoteCI.Server/RemoteCI.Server.csproj +++ b/server/RemoteCI.Server/RemoteCI.Server.csproj @@ -31,12 +31,12 @@ - - + + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/server/tests/RemoteCI.Server.Tests/RemoteCI.Server.Tests.csproj b/server/tests/RemoteCI.Server.Tests/RemoteCI.Server.Tests.csproj index 8729802..7807e28 100644 --- a/server/tests/RemoteCI.Server.Tests/RemoteCI.Server.Tests.csproj +++ b/server/tests/RemoteCI.Server.Tests/RemoteCI.Server.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/server/tests/RemoteCI.Server.Tests/WebSocketRelayTests.cs b/server/tests/RemoteCI.Server.Tests/WebSocketRelayTests.cs index dbefc25..d8e289a 100644 --- a/server/tests/RemoteCI.Server.Tests/WebSocketRelayTests.cs +++ b/server/tests/RemoteCI.Server.Tests/WebSocketRelayTests.cs @@ -301,7 +301,8 @@ await SendAsync(plugin, Envelope.PeerCapabilities(new PeerCapabilities })); var registry = _factory.Services.GetRequiredService(); - await WaitUntilAsync(() => registry.GetPluginDeviceSnapshots().Count == 1); + // 等能力上报处理完成,否则命令会因未声明 SoftwareInventory 能力被直接拒绝而不下发。 + await WaitUntilAsync(() => registry.GetPluginDeviceSnapshots() is [{ HasExplicitCapabilities: true }]); var target = registry.GetPluginDeviceSnapshots().Single(); var pending = registry.SendCommandAndWaitToConnectionAsync(new CommandMessage {