|
11 | 11 |
|
12 | 12 | env: |
13 | 13 | DOTNET_VERSION: "10.x" |
14 | | - MIN_LINE_COVERAGE: "50" |
| 14 | + MIN_LINE_COVERAGE: "60" |
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | build: |
@@ -43,30 +43,30 @@ jobs: |
43 | 43 | - name: Test |
44 | 44 | run: dotnet test SchoolAccount.Web.slnx --configuration Release --no-restore --no-build -- --report-trx --coverage --coverage-output-format cobertura --coverage-settings ${{ github.workspace }}/coverage.config |
45 | 45 |
|
46 | | -# - name: Test report |
47 | | -# uses: EnricoMi/publish-unit-test-result-action@v2 |
48 | | -# if: ${{ !cancelled() }} |
49 | | -# with: |
50 | | -# files: "TestResults/*.trx" |
51 | | -# |
52 | | -# - name: Merge coverage reports and enforce threshold |
53 | | -# if: ${{ !cancelled() }} |
54 | | -# uses: danielpalme/ReportGenerator-GitHub-Action@5 |
55 | | -# with: |
56 | | -# reports: "TestResults/*.cobertura.xml" |
57 | | -# targetdir: TestResults/Merged |
58 | | -# reporttypes: "Cobertura;MarkdownSummaryGithub" |
59 | | -# customSettings: "minimumCoverageThresholds:lineCoverage=${{ env.MIN_LINE_COVERAGE }}" |
60 | | -# |
61 | | -# - name: Write coverage job summary |
62 | | -# if: ${{ !cancelled() }} |
63 | | -# run: cat TestResults/Merged/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY" |
64 | | -# |
65 | | -# - name: Add coverage comment to PR |
66 | | -# if: ${{ !cancelled() && github.event_name == 'pull_request' }} |
67 | | -# uses: marocchino/sticky-pull-request-comment@v3 |
68 | | -# with: |
69 | | -# path: TestResults/Merged/SummaryGithub.md |
70 | | -# |
71 | | -# - name: Publish |
72 | | -# run: dotnet publish SchoolAccount.Web.slnx --configuration Release --no-restore --no-build |
| 46 | + - name: Test report |
| 47 | + uses: EnricoMi/publish-unit-test-result-action@v2 |
| 48 | + if: ${{ !cancelled() }} |
| 49 | + with: |
| 50 | + files: "TestResults/*.trx" |
| 51 | + |
| 52 | + - name: Merge coverage reports and enforce threshold |
| 53 | + if: ${{ !cancelled() }} |
| 54 | + uses: danielpalme/ReportGenerator-GitHub-Action@5 |
| 55 | + with: |
| 56 | + reports: "TestResults/*.cobertura.xml" |
| 57 | + targetdir: TestResults/Merged |
| 58 | + reporttypes: "Cobertura;MarkdownSummaryGithub" |
| 59 | + customSettings: "minimumCoverageThresholds:lineCoverage=${{ env.MIN_LINE_COVERAGE }}" |
| 60 | + |
| 61 | + - name: Write coverage job summary |
| 62 | + if: ${{ !cancelled() }} |
| 63 | + run: cat TestResults/Merged/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY" |
| 64 | + |
| 65 | + - name: Add coverage comment to PR |
| 66 | + if: ${{ !cancelled() && github.event_name == 'pull_request' }} |
| 67 | + uses: marocchino/sticky-pull-request-comment@v3 |
| 68 | + with: |
| 69 | + path: TestResults/Merged/SummaryGithub.md |
| 70 | + |
| 71 | + - name: Publish |
| 72 | + run: dotnet publish SchoolAccount.Web.slnx --configuration Release --no-restore --no-build |
0 commit comments