Skip to content

Commit 44fa08b

Browse files
Merge pull request #669 from PathfinderHonorManager/develop
Coverage calc improvements
2 parents ead1ff8 + 9a92eaf commit 44fa08b

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

.github/workflows/main_pathfinderhonormanager.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Build solution
2222
run: dotnet build --no-incremental
2323
- name: Test with the dotnet CLI (OpenCover)
24-
run: dotnet test PathfinderHonorManager.Tests/PathfinderHonorManager.Tests.csproj /p:CollectCoverage=true /p:CoverletOutput=TestResults/coverage.opencover.xml /p:CoverletOutputFormat=opencover
24+
run: dotnet test PathfinderHonorManager.Tests/PathfinderHonorManager.Tests.csproj /p:CollectCoverage=true /p:CoverletOutput=TestResults/coverage.opencover.xml /p:CoverletOutputFormat=opencover /p:Exclude="[PathfinderHonorManager.Tests*]*"
2525
- name: Upload coverage report
2626
uses: actions/upload-artifact@v4
2727
with:
@@ -72,39 +72,8 @@ jobs:
7272
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7373
run: ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
7474

75-
analyze:
76-
name: Analyze
77-
runs-on: ubuntu-latest
78-
permissions:
79-
actions: read
80-
contents: read
81-
security-events: write
82-
83-
strategy:
84-
fail-fast: false
85-
matrix:
86-
language: [ 'csharp' ]
87-
88-
steps:
89-
- name: Checkout repository
90-
uses: actions/checkout@v4
91-
92-
- uses: ./.github/actions/setup-dotnet
93-
94-
- name: Initialize CodeQL
95-
uses: github/codeql-action/init@v3
96-
with:
97-
languages: ${{ matrix.language }}
98-
99-
- name: Autobuild
100-
uses: github/codeql-action/autobuild@v3
101-
102-
- name: Perform CodeQL Analysis
103-
uses: github/codeql-action/analyze@v3
104-
105-
# Build job that depends on quality checks
10675
build:
107-
needs: [analyze, test, sonar]
76+
needs: [sonar, test]
10877
runs-on: ubuntu-latest
10978
steps:
11079
- uses: actions/checkout@v4

PathfinderHonorManager/DataAccess/PathfinderDBContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.EntityFrameworkCore;
22
using PathfinderHonorManager.Model;
3+
using System.Diagnostics.CodeAnalysis;
34

45
namespace PathfinderHonorManager.DataAccess
56
{
7+
[ExcludeFromCodeCoverage]
68
public class PathfinderContext : DbContext
79
{
810
public PathfinderContext(DbContextOptions<PathfinderContext> options)

PathfinderHonorManager/Mapping/AutoMapperConfig.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
using PathfinderHonorManager.Model.Enum;
77
using Incoming = PathfinderHonorManager.Dto.Incoming;
88
using Outgoing = PathfinderHonorManager.Dto.Outgoing;
9+
using System.Diagnostics.CodeAnalysis;
910

1011
namespace PathfinderHonorManager.Mapping
1112
{
13+
[ExcludeFromCodeCoverage]
1214
public class AutoMapperConfig : Profile
1315
{
1416
public AutoMapperConfig()

0 commit comments

Comments
 (0)