From 3f8ec9a249cff70b22a81583a903135691b9019a Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Tue, 11 Aug 2026 21:16:17 -0700 Subject: [PATCH 1/2] Implement Central Package Management --- .github/workflows/NUnit.Engine.Api.CI.yml | 12 +++++++++- Directory.Packages.props | 20 ++++++++++++++++ NuGet.config | 23 ++++++++++++++----- build.cake | 6 ++--- src/Directory.Build.props | 16 +++++-------- .../NUnit.Engine.Api.Tests.csproj | 4 ++-- src/NUnit.Engine.Api/NUnit.Engine.Api.csproj | 2 +- 7 files changed, 60 insertions(+), 23 deletions(-) create mode 100644 Directory.Packages.props diff --git a/.github/workflows/NUnit.Engine.Api.CI.yml b/.github/workflows/NUnit.Engine.Api.CI.yml index b1f712d..a5c2673 100644 --- a/.github/workflows/NUnit.Engine.Api.CI.yml +++ b/.github/workflows/NUnit.Engine.Api.CI.yml @@ -43,8 +43,18 @@ jobs: - name: 🛠️ Install dotnet tools run: dotnet tool restore + # For reasons I don't understand, the Cake script doesn't work in a workflow + # unless they are restored before the script runs, which this command does. + - name: 🛠️ List Packages + run: dotnet list package --include-transitive + - name: 🔨 Build, Test, Package and Publish (Cake script decides) - run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic + #run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic + uses: cake-build/cake-action@v3 + with: + target: ContinuousIntegration + configuration: Release + #verbosity: diagnostic # Upload packages - name: 💾 Upload Packages diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..787f040 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,20 @@ + + + + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NuGet.config b/NuGet.config index e34c2df..5a82da7 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,9 +1,20 @@  - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build.cake b/build.cake index 1642846..0990694 100644 --- a/build.cake +++ b/build.cake @@ -1,7 +1,7 @@ // Load the recipe -#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.4.7 +#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.4.8 // Comment out above line and uncomment below for local tests of recipe changes -//#load ../NUnit.Cake.Recipe/src/NUnit.Cake.Recipe/content/*.cake +//#load ../NUnit.Cake.Recipe/recipe/*.cake // Initialize BuildSettings BuildSettings.Initialize( @@ -22,7 +22,7 @@ BuildSettings.Packages.Add(new NuGetPackage( HasFile("LICENSE.txt"), HasDirectory("lib/net462").WithFile("nunit.engine.api.dll"), HasDirectory("lib/netstandard2.0").WithFile("nunit.engine.api.dll"), - HasDependency("NUnit.Extensibility.Api", "4.0.0-beta.2.2") + HasDependency("NUnit.Extensibility.Api", "4.0.0-beta.3") }, symbols: new PackageCheck[] { HasDirectory("lib/net462").WithFile("nunit.engine.api.pdb"), diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 74c2f6f..6c1d1d4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,10 +22,6 @@ portable true - - 8.0.0 - 4.0.0-beta.2.2 - 4.3.2 NUnit Software NUnit 4 Runner and Engine @@ -36,13 +32,13 @@ - - + + - - + + @@ -72,9 +68,9 @@ - + - + diff --git a/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj b/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj index 36f6a23..8e9a14a 100644 --- a/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj +++ b/src/NUnit.Engine.Api.Tests/NUnit.Engine.Api.Tests.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj b/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj index 39cea70..5b1ebfc 100644 --- a/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj +++ b/src/NUnit.Engine.Api/NUnit.Engine.Api.csproj @@ -13,7 +13,7 @@ - + From 84bf8c88ac20219a979a006bb1abdbe5c3e270f3 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Thu, 13 Aug 2026 22:29:42 -0700 Subject: [PATCH 2/2] Alternate workflow for central package management --- .github/workflows/NUnit.Engine.Api.CI.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/NUnit.Engine.Api.CI.yml b/.github/workflows/NUnit.Engine.Api.CI.yml index a5c2673..0dc9cad 100644 --- a/.github/workflows/NUnit.Engine.Api.CI.yml +++ b/.github/workflows/NUnit.Engine.Api.CI.yml @@ -49,12 +49,7 @@ jobs: run: dotnet list package --include-transitive - name: 🔨 Build, Test, Package and Publish (Cake script decides) - #run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic - uses: cake-build/cake-action@v3 - with: - target: ContinuousIntegration - configuration: Release - #verbosity: diagnostic + run: dotnet cake --target=ContinuousIntegration --configuration=Release #--verbosity=diagnostic # Upload packages - name: 💾 Upload Packages