File tree Expand file tree Collapse file tree 7 files changed +17
-12
lines changed
PathfinderHonorManager.Tests Expand file tree Collapse file tree 7 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 1818 steps :
1919 - uses : actions/checkout@v4
2020 - uses : ./.github/actions/setup-dotnet
21- - name : Build solution
21+ - name : Build solution (Debug)
2222 run : dotnet build --no-incremental
2323 - name : Test with the dotnet CLI (OpenCover)
2424 run : dotnet test PathfinderHonorManager.Tests/PathfinderHonorManager.Tests.csproj /p:CollectCoverage=true /p:CoverletOutput=TestResults/coverage.opencover.xml /p:CoverletOutputFormat=opencover /p:Exclude="[PathfinderHonorManager.Tests*]*"
6565 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6666 run : |
6767 ./.sonar/scanner/dotnet-sonarscanner begin /k:"PathfinderHonorManager_PathfinderHonorManagerAPI" /o:"pathfinderhonormanager" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverage.opencover.xml"
68- - name : Build solution (SonarQube)
68+ - name : Build solution (for SonarQube)
6969 run : dotnet build --no-incremental
7070 - name : SonarQube end analysis
7171 env :
@@ -74,15 +74,13 @@ jobs:
7474
7575 build :
7676 needs : [sonar, test]
77+ if : github.ref == 'refs/heads/main'
7778 runs-on : ubuntu-latest
7879 steps :
7980 - uses : actions/checkout@v4
80-
8181 - uses : ./.github/actions/setup-dotnet
82-
83- - name : Build with dotnet
82+ - name : Build with dotnet (Release)
8483 run : dotnet build --configuration Release
85-
8684 - name : dotnet publish
8785 run : dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
8886
10098 name : .net-app
10199 path : ${{env.DOTNET_ROOT}}/myapp
102100
103- # Deployment job that only runs on main
104101 deploy :
105102 needs : build
106103 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1212 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1313 <PrivateAssets >all</PrivateAssets >
1414 </PackageReference >
15- <PackageReference Include =" FluentValidation" Version =" 11.11 .0" />
15+ <PackageReference Include =" FluentValidation" Version =" 12.0 .0" />
1616 <PackageReference Include =" Moq" Version =" 4.20.72" />
1717 <PackageReference Include =" NUnit" Version =" 4.3.2" />
1818 <PackageReference Include =" NUnit3TestAdapter" Version =" 5.0.0" />
1919 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.13.0" />
2020 <PackageReference Include =" Microsoft.Data.Sqlite.Core" Version =" 9.0.4" />
2121 <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 9.0.4" />
2222 <PackageReference Include =" FluentValidation.Validators.UnitTestExtension" Version =" 1.11.0.2" />
23- <PackageReference Include =" FluentValidation.DependencyInjectionExtensions" Version =" 11.11 .0" />
23+ <PackageReference Include =" FluentValidation.DependencyInjectionExtensions" Version =" 12.0 .0" />
2424 <PackageReference Include =" Microsoft.EntityFrameworkCore.InMemory" Version =" 9.0.4" />
2525 <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 9.0.4" />
2626 <PackageReference Include =" Npgsql.EntityFrameworkCore.PostgreSQL" Version =" 9.0.4" />
Original file line number Diff line number Diff line change 11using System . Linq ;
22using System . Threading . Tasks ;
33using Microsoft . AspNetCore . Authorization ;
4+ using System . Diagnostics . CodeAnalysis ;
45
56namespace PathfinderHonorManager . Auth
67{
8+ [ ExcludeFromCodeCoverage ]
79 public class HasScopeHandler : AuthorizationHandler < HasScopeRequirement >
810 {
911 protected override Task HandleRequirementAsync ( AuthorizationHandlerContext context , HasScopeRequirement requirement )
Original file line number Diff line number Diff line change 11using System ;
22using Microsoft . AspNetCore . Authorization ;
3+ using System . Diagnostics . CodeAnalysis ;
34
45namespace PathfinderHonorManager . Auth
56{
7+ [ ExcludeFromCodeCoverage ]
68 public class HasScopeRequirement : IAuthorizationRequirement
79 {
810 public string Issuer { get ; }
Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Mvc ;
2+ using System . Diagnostics . CodeAnalysis ;
23
34namespace PathfinderHonorManager . Controllers
45{
6+ [ ExcludeFromCodeCoverage ]
57 public abstract class CustomApiController : Controller
68 {
79 [ NonAction ]
Original file line number Diff line number Diff line change 99
1010 <PropertyGroup Condition =" '$(RunConfiguration)' == 'PathfinderHonorManager' " />
1111 <ItemGroup >
12- <PackageReference Include =" FluentValidation" Version =" 11.11 .0" />
13- <PackageReference Include =" FluentValidation.DependencyInjectionExtensions" Version =" 11.11 .0" />
12+ <PackageReference Include =" FluentValidation" Version =" 12.0 .0" />
13+ <PackageReference Include =" FluentValidation.DependencyInjectionExtensions" Version =" 12.0 .0" />
1414 <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 9.0.4" />
1515 <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 9.0.4" />
1616 <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" 9.0.4" />
1919 <PackageReference Include =" Npgsql" Version =" 9.0.3" />
2020 <PackageReference Include =" Microsoft.EntityFrameworkCore.Proxies" Version =" 9.0.4" />
2121 <PackageReference Include =" AutoMapper.Extensions.Microsoft.DependencyInjection" Version =" 12.0.1" />
22- <PackageReference Include =" FluentValidation.AspNetCore" Version =" 11.3.0 " />
22+ <PackageReference Include =" FluentValidation.AspNetCore" Version =" 11.3.1 " />
2323 <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 8.1.1" />
2424 <PackageReference Include =" Microsoft.Extensions.Diagnostics.HealthChecks" Version =" 9.0.4" />
2525 <PackageReference Include =" AspNetCore.HealthChecks.NpgSql" Version =" 9.0.0" />
Original file line number Diff line number Diff line change 22using Microsoft . AspNetCore . Diagnostics . HealthChecks ;
33using Microsoft . OpenApi . Models ;
44using Swashbuckle . AspNetCore . SwaggerGen ;
5+ using System . Diagnostics . CodeAnalysis ;
56
67namespace PathfinderHonorManager . Swagger
78{
9+ [ ExcludeFromCodeCoverage ]
810 public class HealthCheckEndpointFilter : IDocumentFilter
911 {
1012 public void Apply ( OpenApiDocument swaggerDoc , DocumentFilterContext context )
You can’t perform that action at this time.
0 commit comments