Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:

- name: Checkout repository
uses: actions/[email protected]

- name: Setup .NET 6.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'

- name: Setup .NET SDK from global.json
uses: actions/setup-dotnet@v4
with:
Expand All @@ -55,33 +55,7 @@ jobs:
regedit /s .\build\strongNameBypass.reg

- name: Run the tests
run: dotnet test Wilson.sln --collect:"XPlat Code Coverage" --settings:./build/CodeCoverage.runsettings

- name: Create code coverage report
run: |
dotnet tool install -g dotnet-reportgenerator-globaltool --version 5.4.1
reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:CodeCoverage -reporttypes:'MarkdownSummaryGithub;Cobertura' -filefilters:'+src/**/*.cs'

- name: Write coverage to job summary
shell: bash
run: |
cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
echo "COMMENT_CONTENT_ENV_VAR<<EOF" >> $GITHUB_ENV
echo $(cat CodeCoverage/SummaryGithub.md) >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Comment coverage in PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
id: comment
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.COMMENT_CONTENT_ENV_VAR
})
run: dotnet test Wilson.sln --settings:./build/CodeCoverage.runsettings

# Run baseline package validation
- name: Pack
Expand Down
Loading