-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "dotnet-file", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+)\\((\\d+).+\\):\\s(\\w+)\\s(.+)\\:\\s(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"severity": 3, | ||
"code": 4, | ||
"message": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "dotnet-run", | ||
"pattern": [ | ||
{ | ||
"regexp": "^.+\\s\\:\\s(\\w+)\\s(.*)\\:\\s(.*)$", | ||
"severity": 1, | ||
"code": 2, | ||
"message": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,31 +32,34 @@ jobs: | |
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Dotnet matcher | ||
- name: 🔍 Enable problem matchers | ||
run: echo "::add-matcher::.github/matchers/dotnet.json" | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
# Restore the application to populate the obj folder with RuntimeIdentifiers | ||
- name: 🦸♂️ Restore steriods # this is the caching step, remove if you don't think you need it | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nuget/packages | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget | ||
- name: Restore the application | ||
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
# Execute all unit tests in the solution | ||
- name: Execute unit tests | ||
run: | | ||
echo "## ❔ Test results" >> $GITHUB_STEP_SUMMARY | ||
dotnet test --configuration $env:Configuration --no-restore --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat=\"json,lcov,cobertura,opencover\";MergeWith=${{github.workspace}}/coverage.json;CoverletOutput=${{github.workspace}}/coverage' -- RunConfiguration.CollectSourceInformation=true | ||
run: dotnet test --configuration $env:Configuration --no-restore --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat=\"json,lcov,cobertura,opencover\";MergeWith=${{github.workspace}}/coverage.json;CoverletOutput=${{github.workspace}}/coverage' -- RunConfiguration.CollectSourceInformation=true | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
- name: 📝 Code Coverage report | ||
run: | | ||
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.1.23 | ||
reportgenerator -reports:${{github.workspace}}/coverage.cobertura.xml -targetdir:${{github.workspace}}/report -reporttypes:MarkdownSummaryGithub "-filefilters:-*.g.cs" -verbosity:Warning | ||
sed -i 's/# Summary/## 📝 Code Coverage/g' ${{github.workspace}}/report/SummaryGithub.md | ||
sed -i 's/## Coverage/### Code Coverage details/g' ${{github.workspace}}/report/SummaryGithub.md | ||
cat ${{github.workspace}}/report/*.md >> $GITHUB_STEP_SUMMARY | ||
|
||
# Create coverage badges | ||
- name: OpenCover Badge Generator | ||
|
@@ -65,7 +68,6 @@ jobs: | |
path-to-opencover-xml: ${{github.workspace}}/coverage.opencover.xml | ||
path-to-badges: ./ | ||
minimum-coverage: 75 | ||
commit-badges: false | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Archive the package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ bld/ | |
[Bb]in/ | ||
[Oo]bj/ | ||
[Ll]og/ | ||
CoverageResults/ | ||
|
||
# Visual Studio 2015 cache/options directory | ||
.vs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters