Skip to content

Merge pull request #135 from improvgroup/copilot/update-copyright-yea… #316

Merge pull request #135 from improvgroup/copilot/update-copyright-yea…

Merge pull request #135 from improvgroup/copilot/update-copyright-yea… #316

Workflow file for this run

name: .NET Continuous Integration
permissions:
contents: read
pull-requests: write
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
test:
name: Run Tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore SharedCode.sln
- name: Build
run: dotnet build --no-restore --configuration Release SharedCode.sln
- name: Run tests with coverage
shell: pwsh
run: >
dotnet tool run dotnet-coverage collect
--output coverage.xml
--output-format cobertura
--
pwsh -NoLogo -NoProfile -File ./.github/scripts/run-tunit-tests.ps1
- name: Generate coverage report
if: always()
run: >
dotnet tool run reportgenerator
-reports:coverage.xml
-targetdir:coverage-report
"-reporttypes:Html;MarkdownSummaryGithub;Cobertura"
- name: Write coverage summary to workflow
if: always()
run: cat coverage-report/SummaryGithub.md >> $env:GITHUB_STEP_SUMMARY
shell: pwsh
- name: Post coverage comment on PR
if: always() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v3
with:
header: coverage
path: coverage-report/SummaryGithub.md
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v5
with:
name: coverage-report
path: coverage-report/
if-no-files-found: ignore