Skip to content

Upgrade to .net 8 (#17) #81

Upgrade to .net 8 (#17)

Upgrade to .net 8 (#17) #81

Workflow file for this run

name: Run tests & verify coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Decode the Pfx
run: |
$signing_keys_payload = [System.Convert]::FromBase64String("${{ secrets.SIGNING_KEY }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath "sgKey.snk"
[IO.File]::WriteAllBytes("$certificatePath", $signing_keys_payload)
if (-! $?) { exit 1 } else { exit $LastExitCode }
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-build --filter TestCategory!=Integration
- name: Generate coverage
run: ./generate-coverage.cmd
- name: Upload code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: CoverageResults
verify:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download code coverage resilts
uses: actions/download-artifact@v4
with:
name: code-coverage-report
path: CoverageResults
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: CoverageResults/coverage.net6.0-windows7.0.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '53 44'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md