From 98de793956284fa27cfce3927aa98e641e3b38be Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:03:44 +0200 Subject: [PATCH 01/10] Update ci.yml --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8a1220..55919a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,35 @@ jobs: run: dotnet build --no-restore -c Release - name: Test - run: dotnet test --no-build -c Release --verbosity normal + continue-on-error: true + run: dotnet test --no-build -c Release --logger trx --configuration Release /property:CollectCoverage=True /property:CoverletOutputFormat=opencover + + - name: ReportGenerator + uses: im-open/code-coverage-report-generator@4 + with: + reports: '*/**/coverage.opencover.xml' + targetdir: './coverage-results' + title: dotnet code coverage + reporttypes: 'MarkdownSummary;' + assemblyfilters: '-xunit*;-Dapper;-MyProj.Tests.Shared;' + + - name: Create a status check for the code coverage results + id: dotnet-coverage-check + # You may also reference just the major or major.minor version + uses: im-open/process-code-coverage-summary@v2.2.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + summary-file: './coverage-results/dotnet-summary.md' + create-status-check: true # Default: true + create-pr-comment: true # Default: true + update-comment-if-one-exists: true # Default: true + update-comment-key: 'dotnet' # Default: N/A, used to further identify a comment to update if this action is used more than once in a workflow + ignore-threshold-failures: false # Default: false + line-threshold: 80 # Default: 0, which means thresholds are not applied + branch-threshold: 80 # Default: 0, which means thresholds are not applied + + - name: Fail if there were coverage failures + if: steps.dotnet-coverage-check.outputs.coverage-outcome == 'Failed' + run: | + echo "There were code coverage threshold failures." + exit 1 From 06a43d2cb194ae675aab7bbc60826107571b17ab Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:07:33 +0200 Subject: [PATCH 02/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55919a9..5b3b77d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Test continue-on-error: true - run: dotnet test --no-build -c Release --logger trx --configuration Release /property:CollectCoverage=True /property:CoverletOutputFormat=opencover + run: dotnet test --no-build -c Release --logger trx --configuration Release /property:CollectCoverage=True /property:CoverletOutputFormat=opencover - name: ReportGenerator uses: im-open/code-coverage-report-generator@4 From c8972ddac86a6a0745d766d14ec708a8af7796f1 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:11:44 +0200 Subject: [PATCH 03/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b3b77d..8f7462a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Test continue-on-error: true - run: dotnet test --no-build -c Release --logger trx --configuration Release /property:CollectCoverage=True /property:CoverletOutputFormat=opencover + run: dotnet test --no-build -c Release --logger trx /property:CollectCoverage=True /property:CoverletOutputFormat=opencover - name: ReportGenerator uses: im-open/code-coverage-report-generator@4 From 928ed8badc6a2e3d4a0d4dfe7b407060b853c7c1 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:16:54 +0200 Subject: [PATCH 04/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f7462a..29947cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Test continue-on-error: true - run: dotnet test --no-build -c Release --logger trx /property:CollectCoverage=True /property:CoverletOutputFormat=opencover + run: dotnet test --no-build -c Release -no-restore --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura - name: ReportGenerator uses: im-open/code-coverage-report-generator@4 From 610b5b1d106219bb850b88144d81db81a66d39a2 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:26:35 +0200 Subject: [PATCH 05/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29947cf..9f59911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Test continue-on-error: true - run: dotnet test --no-build -c Release -no-restore --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura + run: dotnet test --no-build -c Release --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura - name: ReportGenerator uses: im-open/code-coverage-report-generator@4 From d8257c053015f98e5622b6afb8b5d717ecbbc367 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:33:03 +0200 Subject: [PATCH 06/10] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f59911..739051b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,11 +32,10 @@ jobs: - name: ReportGenerator uses: im-open/code-coverage-report-generator@4 with: - reports: '*/**/coverage.opencover.xml' + reports: '*/**/coverage.cobertura.xml' targetdir: './coverage-results' title: dotnet code coverage reporttypes: 'MarkdownSummary;' - assemblyfilters: '-xunit*;-Dapper;-MyProj.Tests.Shared;' - name: Create a status check for the code coverage results id: dotnet-coverage-check From 00897d20000dbb71384f3c6b4bc73290e0d39073 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:35:35 +0200 Subject: [PATCH 07/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 739051b..a3f7915 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: uses: im-open/process-code-coverage-summary@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} - summary-file: './coverage-results/dotnet-summary.md' + summary-file: './coverage-results/summary.md' create-status-check: true # Default: true create-pr-comment: true # Default: true update-comment-if-one-exists: true # Default: true From 14414dc16e5c779f9f94684b6a2efe70910fbd6d Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:40:29 +0200 Subject: [PATCH 08/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3f7915..315884d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: uses: im-open/process-code-coverage-summary@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} - summary-file: './coverage-results/summary.md' + summary-file: './coverage-results/Summary.md' create-status-check: true # Default: true create-pr-comment: true # Default: true update-comment-if-one-exists: true # Default: true From c3b86f69561f0853a352867f96fa18fdd12d90a0 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:47:20 +0200 Subject: [PATCH 09/10] Update ci.yml --- .github/workflows/ci.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 315884d..4c2f406 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,21 +39,20 @@ jobs: - name: Create a status check for the code coverage results id: dotnet-coverage-check - # You may also reference just the major or major.minor version uses: im-open/process-code-coverage-summary@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} summary-file: './coverage-results/Summary.md' - create-status-check: true # Default: true - create-pr-comment: true # Default: true - update-comment-if-one-exists: true # Default: true - update-comment-key: 'dotnet' # Default: N/A, used to further identify a comment to update if this action is used more than once in a workflow - ignore-threshold-failures: false # Default: false - line-threshold: 80 # Default: 0, which means thresholds are not applied - branch-threshold: 80 # Default: 0, which means thresholds are not applied + create-status-check: true + create-pr-comment: true + update-comment-if-one-exists: true + update-comment-key: 'dotnet' + ignore-threshold-failures: false + line-threshold: 80 + branch-threshold: 80 - - name: Fail if there were coverage failures - if: steps.dotnet-coverage-check.outputs.coverage-outcome == 'Failed' - run: | - echo "There were code coverage threshold failures." - exit 1 + #- name: Fail if there were coverage failures + #if: steps.dotnet-coverage-check.outputs.coverage-outcome == 'Failed' + #run: | + #echo "There were code coverage threshold failures." + #exit 1 From 9665fe29db70489a02f948ea7d2b6ddb56880748 Mon Sep 17 00:00:00 2001 From: Marcin Torba Date: Tue, 10 Sep 2024 20:50:00 +0200 Subject: [PATCH 10/10] Update ci.yml --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c2f406..8e730b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,16 +43,10 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} summary-file: './coverage-results/Summary.md' - create-status-check: true + #create-status-check: true create-pr-comment: true update-comment-if-one-exists: true update-comment-key: 'dotnet' ignore-threshold-failures: false line-threshold: 80 branch-threshold: 80 - - #- name: Fail if there were coverage failures - #if: steps.dotnet-coverage-check.outputs.coverage-outcome == 'Failed' - #run: | - #echo "There were code coverage threshold failures." - #exit 1