From 2446bcf19dbbf955b87a6fd8420d07a65f3637fc Mon Sep 17 00:00:00 2001 From: James Date: Wed, 20 May 2026 15:27:16 -0700 Subject: [PATCH] Fix CI: drop --no-build so dotnet test builds the SDK-style test project CI was failing with "test source file ... was not found". Root cause: the solution maps the test project's Debug|x64 to Debug|Any CPU.ActiveCfg without a Build.0 entry, so msbuild /p:Platform=x64 doesn't actually build the test project. The MSBuild step then completes successfully, and the following 'dotnet test --no-build' step finds nothing to run. Adding Build.0 lines isn't a good fix because standalone MSBuild can't resolve Microsoft.NET.Sdk for the SDK-style test csproj without the .NET SDK on PATH. The CI runner happens to have it via setup-msbuild, but that creates a local-vs-CI divergence. Cleanest fix: drop --no-build from the dotnet test step. dotnet test invokes the SDK to build the test project (and transitively the plugin project via ProjectReference) before running tests. This mirrors the local workflow exactly. The preceding msbuild step still validates that the plugin builds for Debug|x64 specifically. --- .github/workflows/validate.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 332eabb..7ae1b02 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,5 +26,10 @@ jobs: - name: Build (Debug x64) run: msbuild VirtualTabGroups.sln /p:Configuration=Debug /p:Platform=x64 + # The test project is SDK-style and isn't built by the MSBuild step above + # (the solution maps it to AnyCPU without a Build.0 entry for x64, and + # standalone MSBuild can't resolve Microsoft.NET.Sdk without the .NET SDK). + # `dotnet test` without --no-build invokes the SDK to build the test + # project itself, mirroring what we do locally. - name: Run tests - run: dotnet test tests/VirtualTabGroups.Tests/VirtualTabGroups.Tests.csproj --nologo --no-build + run: dotnet test tests/VirtualTabGroups.Tests/VirtualTabGroups.Tests.csproj --nologo