diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml new file mode 100644 index 00000000..3e3e71c8 --- /dev/null +++ b/.github/workflows/pr-verify.yml @@ -0,0 +1,25 @@ +name: PR Verify + +on: + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + name: PR Verify + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0 + + - name: Build with dotnet + run: dotnet build --configuration Release + + - name: dotnet test + run: dotnet test --configuration Release --no-build \ No newline at end of file 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); } } diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 786b4a10..88d9fbb3 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -9,4 +9,4 @@ public record WeatherForecast public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; init; } -} +} \ No newline at end of file