Skip to content

Commit

Permalink
run integration tests with .net 9.0 (#1506)
Browse files Browse the repository at this point in the history
  • Loading branch information
latonz authored Sep 29, 2024
1 parent 6cf2df6 commit d603515
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
fail-fast: false
matrix:
dotnet:
- '9.0'
- '8.0'
- '7.0'
- '6.0'
Expand Down
4 changes: 3 additions & 1 deletion test/Riok.Mapperly.IntegrationTests/BaseMapperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ private static string GetSnapshotVersionSuffix(Type type, MethodInfo method)

private static Versions GetCurrentVersion()
{
#if NET8_0_OR_GREATER
#if NET9_0_OR_GREATER
return Versions.NET9_0;
#elif NET8_0_OR_GREATER
return Versions.NET8_0;
#elif NET7_0_OR_GREATER
return Versions.NET7_0;
Expand Down
1 change: 1 addition & 0 deletions test/Riok.Mapperly.IntegrationTests/Helpers/Versions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public enum Versions
NET6_0 = 1 << 1,
NET7_0 = 1 << 2,
NET8_0 = 1 << 3,
NET9_0 = 1 << 4,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Task SnapshotGeneratedSource()

#if NET7_0_OR_GREATER
[Fact]
[VersionedSnapshot(Versions.NET8_0)]
[VersionedSnapshot(Versions.NET8_0 | Versions.NET9_0)]
public Task ProjectionShouldTranslateToQuery()
{
return RunWithDatabase(ctx =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.19" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.8" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-rc.1.24451.1" Condition="'$(TargetFramework)' == 'net9.0'" />
</ItemGroup>

<!-- diffplex is only compatible with net7.0 up to 2.x-->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SELECT "o"."CtorValue", "o"."IntValue", "o"."IntInitOnlyValue", "o"."RequiredValue", "o"."StringValue", "o"."RenamedStringValue", "i"."IdValue", "i0"."IdValue", CASE
WHEN "t"."IntValue" IS NOT NULL THEN "t"."IntValue"
ELSE 0
END, "t"."IntValue" IS NOT NULL, "t"."IntValue", "t0"."IntValue" IS NOT NULL, "t0"."IntValue", COALESCE("o"."StringNullableTargetNotNullable", ''), "o0"."Id", "o0"."CtorValue", "o0"."DateTimeValueTargetDateOnly", "o0"."DateTimeValueTargetTimeOnly", "o0"."EnumName", "o0"."EnumRawValue", "o0"."EnumReverseStringValue", "o0"."EnumStringValue", "o0"."EnumValue", "o0"."FlatteningIdValue", "o0"."IgnoredIntValue", "o0"."IgnoredStringValue", "o0"."IntInitOnlyValue", "o0"."IntValue", "o0"."ManuallyMapped", "o0"."ManuallyMappedModified", "o0"."NestedNullableIntValue", "o0"."NestedNullableTargetNotNullableIntValue", "o0"."NullableFlatteningIdValue", "o0"."NullableUnflatteningIdValue", "o0"."RecursiveObjectId", "o0"."RenamedStringValue", "o0"."RequiredValue", "o0"."StringNullableTargetNotNullable", "o0"."StringValue", "o0"."SubObjectSubIntValue", "o0"."UnflatteningIdValue", "o"."Id", "i1"."SubIntValue", "t1"."IntValue", "t1"."TestObjectProjectionId", "t2"."IntValue", CAST("o"."EnumValue" AS INTEGER), CAST("o"."EnumName" AS INTEGER), CAST("o"."EnumRawValue" AS INTEGER), CASE "o"."EnumStringValue"
WHEN 10 THEN 'Value10'
WHEN 20 THEN 'Value20'
WHEN 30 THEN 'Value30'
ELSE CAST("o"."EnumStringValue" AS TEXT)
END, "o"."EnumReverseStringValue", "i1"."SubIntValue" IS NOT NULL, "i1"."BaseIntValue", date("o"."DateTimeValueTargetDateOnly"), "o"."DateTimeValueTargetTimeOnly", "o"."ManuallyMapped", "o"."ManuallyMappedModified" + 10, "t3"."Value", "t3"."Id", "i2"."Id", "i2"."TestObjectProjectionId", "i2"."Value", "l"."Value", "l"."Id"
FROM "Objects" AS "o"
INNER JOIN "IdObject" AS "i" ON "o"."FlatteningIdValue" = "i"."IdValue"
LEFT JOIN "IdObject" AS "i0" ON "o"."NullableFlatteningIdValue" = "i0"."IdValue"
LEFT JOIN "TestObjectNested" AS "t" ON "o"."NestedNullableIntValue" = "t"."IntValue"
LEFT JOIN "TestObjectNested" AS "t0" ON "o"."NestedNullableTargetNotNullableIntValue" = "t0"."IntValue"
LEFT JOIN "Objects" AS "o0" ON "o"."Id" = "o0"."RecursiveObjectId"
LEFT JOIN "InheritanceSubObject" AS "i1" ON "o"."SubObjectSubIntValue" = "i1"."SubIntValue"
LEFT JOIN "TestObjectNested" AS "t1" ON "o"."Id" = "t1"."TestObjectProjectionId"
LEFT JOIN "TestObjectNested" AS "t2" ON "o"."Id" = "t2"."TestObjectProjectionId"
LEFT JOIN "TestObjectProjectionEnumValue" AS "t3" ON "o"."Id" = "t3"."TestObjectProjectionId"
LEFT JOIN "IntegerValue" AS "i2" ON "o"."Id" = "i2"."TestObjectProjectionId"
LEFT JOIN "LongValue" AS "l" ON "o"."Id" = "l"."TestObjectProjectionId"
ORDER BY "o"."Id", "i"."IdValue", "i0"."IdValue", "t"."IntValue", "t0"."IntValue", "o0"."Id", "i1"."SubIntValue", "t1"."IntValue", "t2"."IntValue", "t3"."Id", "i2"."Value", "i2"."Id", "l"."Value"

0 comments on commit d603515

Please sign in to comment.