From 9534e708289f47922be2a6c9dc8d9f70e1f8087f Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Jan 2025 16:17:03 -0800 Subject: [PATCH 1/9] Added new line to weather forecast model --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 786b4a10..efe721f3 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -10,3 +10,4 @@ public record WeatherForecast public string? Summary { get; init; } } + From ced6fb5cbed58c14df603fba44bba1e45c4e9faa Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Jan 2025 16:27:00 -0800 Subject: [PATCH 2/9] break the build --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index efe721f3..349e7ef8 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -11,3 +11,4 @@ public record WeatherForecast public string? Summary { get; init; } } +} \ No newline at end of file From e71fd341f0439eeaebc0957182ccc29885174529 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Jan 2025 16:41:17 -0800 Subject: [PATCH 3/9] fixed the build --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 349e7ef8..88d9fbb3 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -9,6 +9,4 @@ public record WeatherForecast public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; init; } -} - } \ No newline at end of file From 00f51f66096d1874e81df68a3a73191ec067df9d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Jan 2025 16:49:48 -0800 Subject: [PATCH 4/9] change to action test --- .github/workflows/pr-verify.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index d7c568bc..3e3e71c8 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -19,4 +19,7 @@ jobs: dotnet-version: 8.0 - name: Build with dotnet - run: dotnet build --configuration Release \ No newline at end of file + run: dotnet build --configuration Release + + - name: dotnet test + run: dotnet test --configuration Release --no-build \ No newline at end of file From 85a1a9b1e53f2de6e3631ca4bad1604da6e65508 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Jan 2025 12:16:52 -0800 Subject: [PATCH 5/9] breaking test --- .../Models/WeatherForecastTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index f03d0f47..32811ed6 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -12,6 +12,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(32); + weatherForecast.TemperatureF.Should().Be(31); } } From e105142928e903d816c6efcac978b22914610469 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Jan 2025 12:27:50 -0800 Subject: [PATCH 6/9] fixed test --- .../Models/WeatherForecastTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index 32811ed6..f03d0f47 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -12,6 +12,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(31); + weatherForecast.TemperatureF.Should().Be(32); } } From 0a057d957ca7aec9d11e1d5d8fd1ba324b7c4367 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Jan 2025 14:09:39 -0800 Subject: [PATCH 7/9] break format --- .github/workflows/pr-verify.yml | 5 ++++- .../GitHubActionsDotNet.Api.Tests.csproj | 12 ++++++------ .../Models/WeatherForecastTests.cs | 4 +++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 3e3e71c8..f634984e 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -22,4 +22,7 @@ jobs: run: dotnet build --configuration Release - name: dotnet test - run: dotnet test --configuration Release --no-build \ No newline at end of file + run: dotnet test --configuration Release --no-build + + - name: dotnet format + run: dotnet format -v detailed --verify-no-changes \ No newline at end of file diff --git a/src/GitHubActionsDotNet.Api.Tests/GitHubActionsDotNet.Api.Tests.csproj b/src/GitHubActionsDotNet.Api.Tests/GitHubActionsDotNet.Api.Tests.csproj index 424bab8f..c8d83d3b 100644 --- a/src/GitHubActionsDotNet.Api.Tests/GitHubActionsDotNet.Api.Tests.csproj +++ b/src/GitHubActionsDotNet.Api.Tests/GitHubActionsDotNet.Api.Tests.csproj @@ -11,15 +11,15 @@ - - - - - + + + + + - + diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index f03d0f47..4c329652 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -1,7 +1,9 @@ namespace GitHubActionsDotNet.Api.Tests; + using FluentAssertions; using GitHubActionsDotNet.Api.Models; + public class WeatherForecastTests { [Fact] @@ -12,6 +14,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(32); + weatherForecast.TemperatureF.Should().Be(32); } } From 7e5fa122d206abac026a668808ccb0f1bdbde6aa Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Jan 2025 14:13:12 -0800 Subject: [PATCH 8/9] fixed brokenb test format --- .../Models/WeatherForecastTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index 4c329652..4961f8b7 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -14,6 +14,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(32); + weatherForecast.TemperatureF.Should().Be(32); } } From 712c60d944cd6a2e4a45207732719e54b9106e5a Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Jan 2025 14:14:47 -0800 Subject: [PATCH 9/9] fixed brokenb test format --- src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj b/src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj index f18b2634..5b4d518c 100644 --- a/src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj +++ b/src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj @@ -11,4 +11,4 @@ - + \ No newline at end of file