diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 049f73d..cf3188d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,11 @@ jobs: - name: Use GitVersion id: gitversion # step id used as reference for output values uses: gittools/actions/gitversion/execute@v0.9.11 - - name: Setup .NET Core + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: | - 3.1.x - 6.0.x + dotnet-version: | + 8.x - name: Build with dotnet run: dotnet build --configuration Release -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} - name: Test with dotnet diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 40d1afb..bbad832 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,12 +11,11 @@ jobs: steps: - name: Download artifact run: wget -nv ${{ github.event.release.assets[0].browser_download_url }} - - name: Setup .NET Core + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: | - 3.1.x - 6.0.x + dotnet-version: | + 8.x - name: Publish package env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2f144b..bd7f893 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,12 +21,11 @@ jobs: - name: Use GitVersion id: gitversion # step id used as reference for output values uses: gittools/actions/gitversion/execute@v0.9.11 - - name: Setup .NET Core + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: | - 3.1.x - 6.0.x + dotnet-version: | + 8.x - name: Build with dotnet run: dotnet build --configuration Release -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} - name: Test with dotnet diff --git a/Kontent.Statiq.Tests/Kontent.Statiq.Tests.csproj b/Kontent.Statiq.Tests/Kontent.Statiq.Tests.csproj index 0dfd129..0ec813b 100644 --- a/Kontent.Statiq.Tests/Kontent.Statiq.Tests.csproj +++ b/Kontent.Statiq.Tests/Kontent.Statiq.Tests.csproj @@ -1,25 +1,26 @@  - net6 + net8.0 false enable - - - - + + + + - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Kontent.Statiq.Tests/Tools/LoggerTestExtensions.cs b/Kontent.Statiq.Tests/Tools/LoggerTestExtensions.cs index 4e0e5da..47a4eb9 100644 --- a/Kontent.Statiq.Tests/Tools/LoggerTestExtensions.cs +++ b/Kontent.Statiq.Tests/Tools/LoggerTestExtensions.cs @@ -18,8 +18,7 @@ public static void VerifyLogged(this ILogger logger, LogLevel level, string logM if (actualLevel != level) { - throw new AssertActualExpectedException($"[{level}] {logMessage}", $"[{actualLevel}] {actualMessage}", - $"Unexpected log level for log message"); + throw new XunitException($"Unexpected log level for log message. Expected: [{level}] `{logMessage}`. Actual: [{actualLevel}] `{actualMessage}`"); } } diff --git a/Kontent.Statiq.Tests/Tools/TestContentItemSystemAttributes.cs b/Kontent.Statiq.Tests/Tools/TestContentItemSystemAttributes.cs index 5ded61b..dc475a3 100644 --- a/Kontent.Statiq.Tests/Tools/TestContentItemSystemAttributes.cs +++ b/Kontent.Statiq.Tests/Tools/TestContentItemSystemAttributes.cs @@ -14,6 +14,7 @@ internal sealed class TestContentItemSystemAttributes : IContentItemSystemAttrib public string Codename { get; internal set; } = ""; public string Type { get; internal set; } = ""; public string Collection { get; } = ""; + public string Workflow => ""; public string WorkflowStep { get; internal set; } = ""; public IList SitemapLocation { get; internal set; } = Array.Empty(); public DateTime LastModified { get; internal set; } diff --git a/Kontent.Statiq.Tests/Tools/XUnitLogger.cs b/Kontent.Statiq.Tests/Tools/XUnitLogger.cs index d1b48c9..bc1993c 100644 --- a/Kontent.Statiq.Tests/Tools/XUnitLogger.cs +++ b/Kontent.Statiq.Tests/Tools/XUnitLogger.cs @@ -38,7 +38,7 @@ public XunitLogger(ITestOutputHelper testOutputHelper, string categoryName) _categoryName = categoryName; } - public IDisposable BeginScope(TState state) + public IDisposable? BeginScope(TState state) where TState : notnull { return NoopDisposable.Instance; } diff --git a/Kontent.Statiq/Kontent.Statiq.csproj b/Kontent.Statiq/Kontent.Statiq.csproj index 48db676..9abf867 100644 --- a/Kontent.Statiq/Kontent.Statiq.csproj +++ b/Kontent.Statiq/Kontent.Statiq.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 Marnix van Valen Kontent.Statiq Kentico Kontent module for Statiq. Fetch content and assets from Kontent headless CMS. @@ -29,8 +29,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/README.md b/README.md index 06a84e7..d3b6c5b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Module to retrieve content from [Kentico Kontent](https://kontent.ai) for building static websites with [Statiq](https://Statiq.dev). -Works with .NET 6. +Works with .NET 8. ## Getting started @@ -63,7 +63,7 @@ public static class Program services.AddSingleton(); // Configure Delivery SDK services.AddDeliveryClient(opts => - opts.WithProjectId("") + opts.WithEnvironmentId("") .UseProductionApi() .Build()); })