diff --git a/.github/workflows/Build_&_Test.yml b/.github/workflows/Build_&_Test.yml index c77a22cf..68956841 100644 --- a/.github/workflows/Build_&_Test.yml +++ b/.github/workflows/Build_&_Test.yml @@ -29,13 +29,9 @@ jobs: name: ubuntu-latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: 'Cache: .nuke/temp, ~/.nuget/packages' - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - path: | - .nuke/temp - ~/.nuget/packages - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + dotnet-version: '9' - name: 'Run: Test' run: ./build.cmd Test diff --git a/.github/workflows/Manual_Nuget_Push.yml b/.github/workflows/Manual_Nuget_Push.yml index 799fe86f..bd0028d9 100644 --- a/.github/workflows/Manual_Nuget_Push.yml +++ b/.github/workflows/Manual_Nuget_Push.yml @@ -23,14 +23,11 @@ jobs: name: ubuntu-latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: 'Cache: .nuke/temp, ~/.nuget/packages' - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - path: | - .nuke/temp - ~/.nuget/packages - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + dotnet-version: '9' + - name: 'Run: NugetPush' run: ./build.cmd NugetPush env: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1cebf3bc..32fccc4f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,20 +12,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install .NET Core 8.0.x - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v5 - name: Install dependencies run: npm ci @@ -37,7 +37,7 @@ jobs: touch docs/.vitepress/dist/.nojekyll - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: docs/.vitepress/dist @@ -51,4 +51,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 52dad19b..38604bc8 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,10 +1,48 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/build", - "title": "Build Schema", "definitions": { - "build": { - "type": "object", + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Clean", + "Compile", + "NugetPack", + "NugetPush", + "Restore", + "Test" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { "properties": { "Continue": { "type": "boolean", @@ -15,35 +53,13 @@ "description": "Shows the help text for this build assembly" }, "Host": { - "type": "string", "description": "Host for execution. Default is 'automatic'", - "enum": [ - "AppVeyor", - "AzurePipelines", - "Bamboo", - "Bitbucket", - "Bitrise", - "GitHubActions", - "GitLab", - "Jenkins", - "Rider", - "SpaceAutomation", - "TeamCity", - "Terminal", - "TravisCI", - "VisualStudio", - "VSCode" - ] + "$ref": "#/definitions/Host" }, "NoLogo": { "type": "boolean", "description": "Disables displaying the NUKE logo" }, - "NugetApiKey": { - "type": "string", - "description": "Nuget Api Key", - "default": "Secrets must be entered via 'nuke :secrets [profile]'" - }, "Partition": { "type": "string", "description": "Partition to use on CI" @@ -67,47 +83,39 @@ "type": "array", "description": "List of targets to be skipped. Empty list skips all dependencies", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "NugetPack", - "NugetPush", - "Restore", - "Test" - ] + "$ref": "#/definitions/ExecutableTarget" } }, - "Solution": { - "type": "string", - "description": "Path to a solution file that is automatically loaded" - }, "Target": { "type": "array", "description": "List of targets to be invoked. Default is '{default_target}'", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "NugetPack", - "NugetPush", - "Restore", - "Test" - ] + "$ref": "#/definitions/ExecutableTarget" } }, "Verbosity": { - "type": "string", "description": "Logging verbosity during build execution. Default is 'Normal'", - "enum": [ - "Minimal", - "Normal", - "Quiet", - "Verbose" - ] + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "allOf": [ + { + "properties": { + "NugetApiKey": { + "type": "string", + "description": "Nuget Api Key", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" } } + }, + { + "$ref": "#/definitions/NukeBuild" } - } + ] } diff --git a/build/_build.csproj b/build/_build.csproj index 558b2893..29331b29 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -12,7 +12,7 @@ - + diff --git a/build/build.cs b/build/build.cs index 7a785468..edc7eff8 100644 --- a/build/build.cs +++ b/build/build.cs @@ -18,15 +18,17 @@ [GitHubActions( "Build & Test", GitHubActionsImage.UbuntuLatest, - OnPushBranches = new []{ "master" }, - OnPullRequestBranches = new []{ "master" }, - InvokedTargets = new[] { nameof(Test) })] + OnPushBranches = ["master"], + OnPullRequestBranches = ["master"], + InvokedTargets = [nameof(Test)], + AutoGenerate = false)] [GitHubActions( "Manual Nuget Push", GitHubActionsImage.UbuntuLatest, - On = new[] { GitHubActionsTrigger.WorkflowDispatch }, - InvokedTargets = new[] { nameof(NugetPush) }, - ImportSecrets = new[] { nameof(NugetApiKey) })] + On = [GitHubActionsTrigger.WorkflowDispatch], + InvokedTargets = [nameof(NugetPush)], + ImportSecrets = [nameof(NugetApiKey)], + AutoGenerate = false)] class Build : NukeBuild { /// Support plugins are available for: diff --git a/docs/guide/tunit.md b/docs/guide/tunit.md index a02b1e58..38cc896d 100644 --- a/docs/guide/tunit.md +++ b/docs/guide/tunit.md @@ -25,7 +25,7 @@ public sealed class AlbaBootstrap : IAsyncInitializer, IAsyncDisposable snippet source | anchor -Then inject the instance by added `[ClassDataSource(Shared = SharedType.Globally)]` to your test class. We recommend creating a base class to allow easier access of the host and any other dependencies. +Then inject the instance by added `[ClassDataSource(Shared = SharedType.PerAssembly)]` to your test class. We recommend creating a base class to allow easier access of the host and any other dependencies. @@ -35,7 +35,7 @@ public abstract class AlbaTestBase(AlbaBootstrap albaBootstrap) protected IAlbaHost Host => albaBootstrap.Host; } -[ClassDataSource(Shared = SharedType.Globally)] +[ClassDataSource(Shared = SharedType.PerAssembly)] public class MyTestClass(AlbaBootstrap albaBootstrap) : AlbaTestBase(albaBootstrap) { [Test] diff --git a/src/Alba.Testing/Alba.Testing.csproj b/src/Alba.Testing/Alba.Testing.csproj index 00eea9e4..552a86cf 100644 --- a/src/Alba.Testing/Alba.Testing.csproj +++ b/src/Alba.Testing/Alba.Testing.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/Alba/Alba.csproj b/src/Alba/Alba.csproj index 8f1f9712..6471bf85 100644 --- a/src/Alba/Alba.csproj +++ b/src/Alba/Alba.csproj @@ -2,8 +2,8 @@ Supercharged integration testing for ASP.NET Core HTTP endpoints - 8.0.0 - net8.0 + 8.1.0 + net8.0;net9.0 http://jasperfx.github.io/alba/ Apache-2.0 git @@ -32,4 +32,9 @@ + + + + + diff --git a/src/IdentityServer.New/IdentityServer.New.csproj b/src/IdentityServer.New/IdentityServer.New.csproj index dbc7dd55..54cd276d 100644 --- a/src/IdentityServer.New/IdentityServer.New.csproj +++ b/src/IdentityServer.New/IdentityServer.New.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NUnitSamples/NUnitSamples.csproj b/src/NUnitSamples/NUnitSamples.csproj index a66638ee..b343c91e 100644 --- a/src/NUnitSamples/NUnitSamples.csproj +++ b/src/NUnitSamples/NUnitSamples.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/TUnitSamples/Program.cs b/src/TUnitSamples/Program.cs index c858d32d..edea5de5 100644 --- a/src/TUnitSamples/Program.cs +++ b/src/TUnitSamples/Program.cs @@ -26,7 +26,7 @@ public abstract class AlbaTestBase(AlbaBootstrap albaBootstrap) protected IAlbaHost Host => albaBootstrap.Host; } -[ClassDataSource(Shared = SharedType.Globally)] +[ClassDataSource(Shared = SharedType.PerAssembly)] public class MyTestClass(AlbaBootstrap albaBootstrap) : AlbaTestBase(albaBootstrap) { [Test] diff --git a/src/TUnitSamples/TUnitSamples.csproj b/src/TUnitSamples/TUnitSamples.csproj index b1d1dfea..24120c81 100644 --- a/src/TUnitSamples/TUnitSamples.csproj +++ b/src/TUnitSamples/TUnitSamples.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/WebApiNet6/WebApiNet6.csproj b/src/WebApiNet6/WebApiNet6.csproj index 3dcb4845..81530ebc 100644 --- a/src/WebApiNet6/WebApiNet6.csproj +++ b/src/WebApiNet6/WebApiNet6.csproj @@ -1,7 +1,7 @@  - net8.0 + net8.0;net9.0 enable enable diff --git a/src/WebAppSecuredWithJwt/WebAppSecuredWithJwt.csproj b/src/WebAppSecuredWithJwt/WebAppSecuredWithJwt.csproj index ebd9567e..ca2ff4c5 100644 --- a/src/WebAppSecuredWithJwt/WebAppSecuredWithJwt.csproj +++ b/src/WebAppSecuredWithJwt/WebAppSecuredWithJwt.csproj @@ -6,7 +6,7 @@ - +