From 0b5f6d7827d74632c1b239d6ceb9f9f4ea24e8d5 Mon Sep 17 00:00:00 2001 From: Korolev Dmitry Date: Fri, 13 Sep 2024 11:11:20 +0200 Subject: [PATCH] chore: handle warnings in build pipeline (#127) * handle warnings in build * another warning * and last one from build --- .github/workflows/dotnet-integration.yml | 7 +++---- .github/workflows/dotnet.yml | 5 ++--- .../Models/DbStringPoco.cs | 2 +- test/Dapper.AOT.Test.Integration/DbStringTests.cs | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dotnet-integration.yml b/.github/workflows/dotnet-integration.yml index 5bd5a8f..ddef954 100644 --- a/.github/workflows/dotnet-integration.yml +++ b/.github/workflows/dotnet-integration.yml @@ -13,17 +13,16 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # depth is needed for nbgv - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x - 8.0.x - include-prerelease: true + 8.0.x - name: Build run: dotnet build Dapper.AOT.sln -c Debug diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a45009a..4991b89 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,17 +13,16 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # depth is needed for nbgv - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x 8.0.x - include-prerelease: true - uses: dotnet/nbgv@master with: diff --git a/test/Dapper.AOT.Test.Integration.Executables/Models/DbStringPoco.cs b/test/Dapper.AOT.Test.Integration.Executables/Models/DbStringPoco.cs index ed41851..8c846a9 100644 --- a/test/Dapper.AOT.Test.Integration.Executables/Models/DbStringPoco.cs +++ b/test/Dapper.AOT.Test.Integration.Executables/Models/DbStringPoco.cs @@ -5,5 +5,5 @@ public class DbStringPoco public const string TableName = "dbStringPoco"; public int Id { get; set; } - public string Name { get; set; } + public string? Name { get; set; } } \ No newline at end of file diff --git a/test/Dapper.AOT.Test.Integration/DbStringTests.cs b/test/Dapper.AOT.Test.Integration/DbStringTests.cs index 9822803..d0cc359 100644 --- a/test/Dapper.AOT.Test.Integration/DbStringTests.cs +++ b/test/Dapper.AOT.Test.Integration/DbStringTests.cs @@ -37,7 +37,8 @@ public void DbString_BasicUsage_InterceptsAndReturnsExpectedData() { var result = ExecuteInterceptedUserCode(DbConnection); + Assert.NotNull(result); Assert.True(result.Id.Equals(1)); - Assert.True(result.Name.Equals("my-dbString", StringComparison.InvariantCultureIgnoreCase)); + Assert.Equal("my-dbString", result.Name); } } \ No newline at end of file