Merge pull request #74 from EvotecIT/add-parameters-for-baseuri-and-c… #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test PowerShell | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '*.md' | |
| - 'Docs/**' | |
| - 'Examples/**' | |
| - '.gitignore' | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| DOTNET_VERSION: '8.x' | |
| BUILD_CONFIGURATION: 'Debug' | |
| jobs: | |
| test-windows-ps5: | |
| name: 'Windows PowerShell 5.1' | |
| 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: Install PowerShell modules | |
| shell: powershell | |
| run: | | |
| Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)" | |
| Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber | |
| Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber | |
| - name: Build .NET solution | |
| run: | | |
| dotnet restore Sources/PSWritePDF.sln | |
| dotnet build Sources/PSWritePDF.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: powershell | |
| run: ./PSWritePDF.Tests.ps1 | |
| test-windows-ps7: | |
| name: 'Windows PowerShell 7' | |
| 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: Install PowerShell modules | |
| shell: pwsh | |
| run: | | |
| Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)" | |
| Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber | |
| Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber | |
| - name: Build .NET solution | |
| run: | | |
| dotnet restore Sources/PSWritePDF.sln | |
| dotnet build Sources/PSWritePDF.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: pwsh | |
| run: ./PSWritePDF.Tests.ps1 |