Bump xunit.runner.visualstudio from 3.1.0 to 3.1.5 #852
Workflow file for this run
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: | |
| - main | |
| paths-ignore: | |
| - '*.md' | |
| - 'Docs/**' | |
| - 'Examples/**' | |
| - '.gitignore' | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| DOTNET_VERSION: '8.x' | |
| BUILD_CONFIGURATION: 'Debug' | |
| jobs: | |
| refresh-psd1: | |
| name: 'Refresh PSD1' | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PowerShell modules | |
| shell: pwsh | |
| run: | | |
| Install-Module PSPublishModule -Force -Scope CurrentUser -AllowClobber | |
| - name: Refresh module manifest | |
| shell: pwsh | |
| env: | |
| RefreshPSD1Only: 'true' | |
| run: | | |
| ./Module/Build/Build-Module.ps1 | |
| - name: Upload refreshed manifest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: psd1 | |
| path: Module/DnsClientX.psd1 | |
| test-windows-ps5: | |
| needs: refresh-psd1 | |
| name: 'Windows PowerShell 5.1' | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download manifest | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: psd1 | |
| path: . | |
| - 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 DnsClientX.sln | |
| dotnet build DnsClientX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: powershell | |
| run: ./Module/DnsClientX.Tests.ps1 | |
| test-windows-ps7: | |
| needs: refresh-psd1 | |
| name: 'Windows PowerShell 7' | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download manifest | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: psd1 | |
| path: . | |
| - 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 DnsClientX.sln | |
| dotnet build DnsClientX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: pwsh | |
| run: ./Module/DnsClientX.Tests.ps1 | |
| test-ubuntu: | |
| needs: refresh-psd1 | |
| name: 'Ubuntu PowerShell 7' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download manifest | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: psd1 | |
| path: . | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Install PowerShell | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
| curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list | |
| sudo apt-get update | |
| sudo apt-get install -y powershell | |
| - 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 DnsClientX.sln | |
| dotnet build DnsClientX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: pwsh | |
| run: ./Module/DnsClientX.Tests.ps1 | |
| test-macos: | |
| needs: refresh-psd1 | |
| name: 'macOS PowerShell 7' | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download manifest | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: psd1 | |
| path: . | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Install PowerShell | |
| run: brew install --cask powershell | |
| - 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 DnsClientX.sln | |
| dotnet build DnsClientX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore | |
| - name: Run PowerShell tests | |
| shell: pwsh | |
| run: ./Module/DnsClientX.Tests.ps1 | |