From fd03b8b774a929cddec42fc7597af55c68a93486 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Fri, 27 Feb 2026 13:08:57 +0000 Subject: [PATCH 1/2] Remove code coverage steps from nightly build Removed code coverage steps and related comments from nightly build workflow. --- .github/workflows/nightlybuild.yml | 47 ------------------------------ 1 file changed, 47 deletions(-) diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index 68f9a0c6..82e2f37e 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -28,21 +28,6 @@ jobs: run: | dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - # - name: Install LCOV merger - # run: npm install -g lcov-result-merger - - # - name: Merge LCOV reports - # run: | - # mkdir -p coverage - # lcov-result-merger "*.info" > lcov.info - - # - name: Upload merged coverage to Codacy - # uses: codacy/codacy-coverage-reporter-action@v1 - # with: - # project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - # coverage-reports: ./lcov.info - - # chrometests: # name: "Nightly Build - Chrome" # env: @@ -204,35 +189,3 @@ jobs: # with: # name: firefoxtracelogs # path: /home/txnproc/trace/ - - codecoverage: - name: "Nightly Build - Code Coverage" - env: - ASPNETCORE_ENVIRONMENT: "Production" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2.3.4 - - - name: Restore Nuget Packages - run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} - - - name: Build Code - run: dotnet build EstateManagementUI.sln --configuration Release - - - name: Run Unit Tests - run: | - echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - - - name: Merge LCOV reports - run: | - sudo npm install -g lcov-result-merger - lcov-result-merger "*.info" > lcov.info - - - name: Upload merged coverage to Codacy - uses: codacy/codacy-coverage-reporter-action@v1 - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./lcov.info From a2c6b32ba2d1ff9eeab8aad7f4e8f18ce0efb8d9 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Fri, 27 Feb 2026 13:09:53 +0000 Subject: [PATCH 2/2] Add GitHub Actions workflow for code coverage --- .github/workflows/codecoverage.yml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/codecoverage.yml diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml new file mode 100644 index 00000000..736d7475 --- /dev/null +++ b/.github/workflows/codecoverage.yml @@ -0,0 +1,44 @@ +name: Code Coverage + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + workflow_dispatch: + +jobs: + codecoverage: + name: "Code Coverage" + env: + ASPNETCORE_ENVIRONMENT: "Production" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.3.4 + + - name: Restore Nuget Packages + run: dotnet restore EstateManagementUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} + + - name: Build Code + run: dotnet build EstateManagementUI.sln --configuration Release + + - name: Run Unit Tests + run: | + echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" + dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --settings .runsettings /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + + - name: Install LCOV merger + run: npm install -g lcov-result-merger + + - name: Merge LCOV reports + run: | + mkdir -p coverage + lcov-result-merger "*.info" > lcov.info + + - name: Upload merged coverage to Codacy + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: ./lcov.info