Skip to content

Merge pull request #74 from EvotecIT/add-parameters-for-baseuri-and-c… #40

Merge pull request #74 from EvotecIT/add-parameters-for-baseuri-and-c…

Merge pull request #74 from EvotecIT/add-parameters-for-baseuri-and-c… #40

Workflow file for this run

name: Test .NET
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'Docs/**'
- 'Examples/**'
- '.gitignore'
pull_request:
branches:
- master
env:
DOTNET_VERSION: '8.x'
BUILD_CONFIGURATION: 'Release'
jobs:
test-windows:
name: 'Windows'
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore Sources/PSWritePDF.sln
- name: Build solution
run: dotnet build Sources/PSWritePDF.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore
- name: Run tests (net8.0)
run: dotnet test Sources/PdfIMO.Tests/PdfIMO.Tests.csproj --configuration ${{ env.BUILD_CONFIGURATION }} --framework net8.0 --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"
- name: Run tests (net9.0)
run: dotnet test Sources/PdfIMO.Tests/PdfIMO.Tests.csproj --configuration ${{ env.BUILD_CONFIGURATION }} --framework net9.0 --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-windows
path: '**/*.trx'
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-reports-windows
path: '**/coverage.cobertura.xml'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: '**/coverage.cobertura.xml'