Skip to content

Commit 8e6e2bd

Browse files
committed
feat(button): threshold
1 parent 75bbce2 commit 8e6e2bd

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

.github/workflows/reuseable-ci-checks.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -444,47 +444,30 @@ jobs:
444444
E2ETracingEnabled: ${{ env.E2E_TRACING_ENABLED }}
445445
HeadlessTesting: ${{ env.HEADLESS_TESTING }}
446446
run: |
447-
dotnet test --collect:"XPlat Code Coverage"
448-
447+
dotnet test --collect:"XPlat Code Coverage" --settings ./coverlet.runsettings \
448+
/p:Threshold=80,50,80
449449
450450
- name: Generate Coverage Report
451451
run: |
452452
dotnet reportgenerator \
453453
-reports:"**/TestResults/**/coverage.cobertura.xml" \
454454
-targetdir:coveragereport \
455-
-reporttypes:Html \
456-
-thresholdtype:line \
457-
-threshold:80
455+
-reporttypes:Html
456+
#\
457+
# -thresholdtype:line \
458+
# -threshold:80
458459
459460
- name: upload coverage report
460461
if: always()
461462
uses: actions/upload-artifact@v4
462463
with:
463464
name: coverage-report
464465
path: coveragereport
465-
466-
- name: Debug PACKAGES_TOKEN value (Optional)
466+
467+
- name: Debug PACKAGES_TOKEN value (Optional) qqqq
467468
run: |
468469
echo "PACKAGES_TOKEN is set."
469470
echo "PACKAGES_TOKEN=$PACKAGES_TOKEN" # This should print nothing, it's a secret!
470-
echo "run id"
471-
echo "does this run id match above ${GITHUB_RUN_ID}"
472-
473-
# - name: Get artifact location
474-
# env:
475-
# PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
476-
# GH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
477-
# run: |
478-
# # Get the artifact list for the current workflow run
479-
# ARTIFACT_LIST=$(gh api "repos/TechnologyEnhancedLearning/TELBlazor/actions/runs/${GITHUB_RUN_ID}/artifacts")
480-
# # Echo the entire artifact list for debugging purposes
481-
# echo "Artifact List: $ARTIFACT_LIST"
482-
# # Extract the download URL from the artifact list (first artifact in the list)
483-
# #ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].archive_download_url')
484-
# ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].url')
485-
# # Echo the artifact URL to confirm
486-
# echo "Artifact URL: $ARTIFACT_URL"
487-
# echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV
488471
489472
- name: Get artifact location
490473
env:

TELBlazor.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
88
.commitlintrc.json = .commitlintrc.json
99
.releaserc.json = .releaserc.json
1010
Directory.Build.props = Directory.Build.props
11+
coverlet.runsettings.Delete = coverlet.runsettings.Delete
1112
Directory.Packages.props = Directory.Packages.props
1213
global.json = global.json
1314
nuget.config = nuget.config

coverlet.runsettings.Delete

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<RunSettings>
3+
<DataCollectionRunSettings>
4+
<DataCollectors>
5+
<DataCollector friendlyName="XPlat code coverage">
6+
<Configuration>
7+
<Format>cobertura</Format>
8+
<Threshold>80</Threshold>
9+
<ThresholdType>line</ThresholdType>
10+
<ThresholdStat>total</ThresholdStat>
11+
<ExcludeByAttribute>ExcludeFromCodeCoverage</ExcludeByAttribute>
12+
<ExcludeByFile>**/Program.cs,**/Startup.cs</ExcludeByFile>
13+
</Configuration>
14+
</DataCollector>
15+
</DataCollectors>
16+
</DataCollectionRunSettings>
17+
</RunSettings>

0 commit comments

Comments
 (0)