From 244f0d5dae031e43853e920e5097333eb17c0d19 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 18 Aug 2026 19:57:24 +0100 Subject: [PATCH 1/3] nuget updates --- Directory.Packages.props | 66 +++++++++---------- .../NuGet.Config => NuGet.Config | 0 2 files changed, 33 insertions(+), 33 deletions(-) rename EstateReportingAPI/NuGet.Config => NuGet.Config (100%) diff --git a/Directory.Packages.props b/Directory.Packages.props index 4941d07..aed26ce 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,53 +3,53 @@ true - - - - - - - + + + + + + + - - - - + + + + - - - - - + + + + + - - - + + + - - + + - - + + - - - - - - - + + + + + + + - + - - + + \ No newline at end of file diff --git a/EstateReportingAPI/NuGet.Config b/NuGet.Config similarity index 100% rename from EstateReportingAPI/NuGet.Config rename to NuGet.Config From c7bf0851fcac1821d8e4b4b16f04a2d0f3310c87 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 18 Aug 2026 20:04:27 +0100 Subject: [PATCH 2/3] fixes --- EstateReportingAPI/Dockerfile | 2 +- global.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 global.json diff --git a/EstateReportingAPI/Dockerfile b/EstateReportingAPI/Dockerfile index 4e6970e..1a35fb3 100644 --- a/EstateReportingAPI/Dockerfile +++ b/EstateReportingAPI/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src -COPY ["EstateReportingAPI/NuGet.Config", "."] +COPY ["NuGet.Config", "."] COPY ["EstateReportingAPI/EstateReportingAPI.csproj", "EstateReportingAPI/"] COPY ["Directory.Packages.props", "."] COPY . . diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} From 2f7d5cc3bfe832d7d0af6d2c7de83a193de76f98 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 18 Aug 2026 20:55:02 +0100 Subject: [PATCH 3/3] tweaks --- .github/workflows/codecoverage.yml | 28 +++++++++++-------- .github/workflows/nightlybuild.yml | 13 ++++++--- .github/workflows/pullrequest.yml | 15 ++++++---- Directory.Packages.props | 4 +-- ...EstateReportingAPI.IntegrationTests.csproj | 5 ++-- .../EstateReportingAPI.Tests.csproj | 6 ++-- global.json | 5 ---- 7 files changed, 43 insertions(+), 33 deletions(-) delete mode 100644 global.json diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 96ba097..7d02dae 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -16,36 +16,40 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x - name: Restore Nuget Packages run: dotnet restore EstateReportingAPI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} - name: Build Code - run: dotnet build EstateReportingAPI.sln --configuration Release + run: dotnet build EstateReportingAPI.sln --configuration Release --no-restore - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet run --project "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/unit" - name: Build Docker Image run: docker build . --file EstateReportingAPI/Dockerfile --tag estatereportingapi:latest - name: Run Integration Tests run: | - dotnet test "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - - - name: Install LCOV merger - run: npm install -g lcov-result-merger + dotnet run --project "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/integration" - - name: Merge LCOV reports - run: | - mkdir -p coverage - lcov-result-merger "*.info" > lcov.info + - name: Merge Coverage Reports + uses: danielpalme/ReportGenerator-GitHub-Action@v5 + with: + reports: ./coverage/**/*.cobertura.xml + targetdir: ./coverage-report + reporttypes: Cobertura - name: Upload merged coverage to Codacy uses: codacy/codacy-coverage-reporter-action@v1 with: project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./lcov.info + coverage-reports: ./coverage-report/Cobertura.xml diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index a113ca0..2196acf 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -19,7 +19,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x - name: Set Up Variables run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV @@ -28,19 +33,19 @@ jobs: run: dotnet restore EstateReportingAPI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} - name: Build Code - run: dotnet build EstateReportingAPI.sln --configuration Release + run: dotnet build EstateReportingAPI.sln --configuration Release --no-restore - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet run --project "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/unit" - name: Build Docker Image run: docker build . --file EstateReportingAPI/Dockerfile --tag estatereportingapi:latest - name: Run Integration Tests run: | - dotnet test "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet run --project "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/integration" - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b534753..6916776 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -14,22 +14,27 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 - + - uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + - name: Restore Nuget Packages run: dotnet restore EstateReportingAPI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} - name: Build Code - run: dotnet build EstateReportingAPI.sln --configuration Release + run: dotnet build EstateReportingAPI.sln --configuration Release --no-restore - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" + dotnet run --project "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" --configuration Release --no-build - name: Run Integration Tests run: | - dotnet test "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" + dotnet run --project "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" --configuration Release --no-build - uses: actions/upload-artifact@v4 with: diff --git a/Directory.Packages.props b/Directory.Packages.props index aed26ce..0b136cb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,7 +16,7 @@ - + @@ -52,4 +52,4 @@ - \ No newline at end of file + diff --git a/EstateReportingAPI.IntegrationTests/EstateReportingAPI.IntegrationTests.csproj b/EstateReportingAPI.IntegrationTests/EstateReportingAPI.IntegrationTests.csproj index c351496..ab0fcf5 100644 --- a/EstateReportingAPI.IntegrationTests/EstateReportingAPI.IntegrationTests.csproj +++ b/EstateReportingAPI.IntegrationTests/EstateReportingAPI.IntegrationTests.csproj @@ -2,6 +2,8 @@ net10.0 + Exe + true Full false @@ -17,9 +19,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all - runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateReportingAPI.Tests/EstateReportingAPI.Tests.csproj b/EstateReportingAPI.Tests/EstateReportingAPI.Tests.csproj index 82e66d9..aec0648 100644 --- a/EstateReportingAPI.Tests/EstateReportingAPI.Tests.csproj +++ b/EstateReportingAPI.Tests/EstateReportingAPI.Tests.csproj @@ -2,6 +2,8 @@ net10.0 + Exe + true Full false @@ -26,11 +28,9 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/global.json b/global.json deleted file mode 100644 index 3140116..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "test": { - "runner": "Microsoft.Testing.Platform" - } -}