Skip to content

Bump Verify.NUnit from 20.4.0 to 20.5.0 in /tests/NHapi.NUnit.SourceGeneration #575

Bump Verify.NUnit from 20.4.0 to 20.5.0 in /tests/NHapi.NUnit.SourceGeneration

Bump Verify.NUnit from 20.4.0 to 20.5.0 in /tests/NHapi.NUnit.SourceGeneration #575

Workflow file for this run

name: Receive Pull Request
on: [pull_request]
jobs:
build-and-test:
name: Build And Test ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore nHapi (Windows)
if: matrix.os == 'windows-latest'
run: |
dotnet restore nHapi.sln --configfile build\.nuget\NuGet.config
- name: Restore nHapi (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
dotnet restore nHapi.sln --configfile build/.nuget/NuGet.config
- name: Build nHapi
run: |
dotnet build nHapi.sln -c Release --no-restore
- name: Run tests for all target frameworks (Windows)
if: matrix.os == 'windows-latest'
run: |
dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" -r TestResults -c Release -f net461 --no-restore --no-build
dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" -r TestResults -c Release -f net6.0 --no-restore --no-build
dotnet test tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --logger "trx;LogFilePrefix=TestResults" -r TestResults -c Release -f net6.0 --no-restore --no-build
dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" -r TestResults -c Release -f net461 --no-restore --no-build
dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" -r TestResults -c Release -f net6.0 --no-restore --no-build
- name: Run tests for all target frameworks (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
dotnet test tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj --collect:"XPlat Code Coverage" -r TestResults -c Release -f net6.0 --no-restore --no-build
dotnet test tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj --collect:"XPlat Code Coverage" -r TestResults -c Release -f net6.0 --no-restore --no-build
dotnet test tests/NHapi.NUnit/NHapi.NUnit.csproj --collect:"XPlat Code Coverage" -r TestResults -c Release -f net6.0 --no-restore --no-build
- name: Upload Unit Test Results
if: always() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: unit-test-results
path: TestResults\*.trx
- name: Upload Code Coverage Report
if: always() && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: coverage-reports
path: |
TestResults/