diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b621e3..7bbcfce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,6 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - name: Install GitVersion uses: gittools/actions/gitversion/setup@v3 diff --git a/global.json b/global.json new file mode 100644 index 0000000..d4751a0 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "9.0.304", + "rollForward": "latestMinor" + } +} \ No newline at end of file diff --git a/src/Kattbot.Common/Kattbot.Common.csproj b/src/Kattbot.Common/Kattbot.Common.csproj index 0ef5970..ff24bd8 100644 --- a/src/Kattbot.Common/Kattbot.Common.csproj +++ b/src/Kattbot.Common/Kattbot.Common.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 diff --git a/src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj b/src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj index d6d2443..1c57b02 100644 --- a/src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj +++ b/src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 bc907d8f-4d2f-41fe-9b68-79e021dd3545 @@ -18,15 +18,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Kattbot.Data/Kattbot.Data.csproj b/src/Kattbot.Data/Kattbot.Data.csproj index 6324f80..70bad29 100644 --- a/src/Kattbot.Data/Kattbot.Data.csproj +++ b/src/Kattbot.Data/Kattbot.Data.csproj @@ -1,11 +1,11 @@ - net8.0 + net9.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Kattbot/Dockerfile b/src/Kattbot/Dockerfile index 0482800..8f0d391 100644 --- a/src/Kattbot/Dockerfile +++ b/src/Kattbot/Dockerfile @@ -1,6 +1,6 @@ -FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Debug WORKDIR /src COPY ["Directory.Build.props", "."] diff --git a/src/Kattbot/Kattbot.csproj b/src/Kattbot/Kattbot.csproj index c535560..0e710c1 100644 --- a/src/Kattbot/Kattbot.csproj +++ b/src/Kattbot/Kattbot.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 dotnet-Kattbot-79CAD254-2C56-430B-8B4B-16AA8DA8808D Linux @@ -18,19 +18,19 @@ - + - - - - - + + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Kattbot/prod.Dockerfile b/src/Kattbot/prod.Dockerfile index e028004..065d80e 100644 --- a/src/Kattbot/prod.Dockerfile +++ b/src/Kattbot/prod.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Directory.Build.props", "."] @@ -27,7 +27,7 @@ ARG BUILD_CONFIGURATION=Release RUN dotnet ef migrations script --no-build --configuration $BUILD_CONFIGURATION --idempotent -p Kattbot.Data.Migrations -o /output/migrations/database_migration.sql COPY --from=build /src/kattbot-backup-db.sh /output/migrations/ -FROM mcr.microsoft.com/dotnet/runtime:8.0 AS final +FROM mcr.microsoft.com/dotnet/runtime:9.0 AS final WORKDIR /app COPY --from=publish /output/publish . COPY --from=migrations /output/migrations ./migrations/ diff --git a/tests/Kattbot.Tests/ImageServiceTests.cs b/tests/Kattbot.Tests/ImageServiceTests.cs index 3164e0c..5c3c2d4 100644 --- a/tests/Kattbot.Tests/ImageServiceTests.cs +++ b/tests/Kattbot.Tests/ImageServiceTests.cs @@ -14,7 +14,7 @@ namespace Kattbot.Tests; [Ignore] // Can't save to /tmp on GitHub Actions. TODO: fix public class ImageServiceTests { - [DataTestMethod] + [TestMethod] [DataRow("cute_cat.jpg")] [DataRow("froge.png")] public async Task EnsureMaxSize_DownscalesImageIfNeeded(string inputFilename) @@ -32,7 +32,7 @@ public async Task EnsureMaxSize_DownscalesImageIfNeeded(string inputFilename) Assert.IsTrue(resizedImageSize <= maxSizeMb); } - [DataTestMethod] + [TestMethod] [DataRow("slowpoke.jpg", "jpg")] [DataRow("slowpoke.png", "png")] [DataRow("slowpoke.webp", "webp")] diff --git a/tests/Kattbot.Tests/Kattbot.Tests.csproj b/tests/Kattbot.Tests/Kattbot.Tests.csproj index 11ca518..2cf6813 100644 --- a/tests/Kattbot.Tests/Kattbot.Tests.csproj +++ b/tests/Kattbot.Tests/Kattbot.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 false false @@ -10,7 +10,7 @@ - + all