diff --git a/.github/workflows/pester-test-demo.yml b/.github/workflows/pester-test-demo.yml index 85ce3eb43..6bb3a42d9 100644 --- a/.github/workflows/pester-test-demo.yml +++ b/.github/workflows/pester-test-demo.yml @@ -53,6 +53,42 @@ jobs: Install-Module -Name JumpCloud.SDK.V2 -Force Install-Module -Name JumpCloud.SDK.DirectoryInsights -Force Import-Module "./PowerShell/JumpCloud Module/JumpCloud.psd1" + Connect-JConline ${{ secrets.XAPIKEY_PESTER }} -Force + $matrixOS = "${{ matrix.os }}" + switch ($matrixOS) { + ubuntu-latest { + Invoke-Pester -Path "./PowerShell/JumpCloud Module/Tests/Public/Users/Get-JCUser.tests.ps1" + } + macos-latest { + Invoke-Pester -Path "./PowerShell/JumpCloud Module/Tests/Public/Users/Get-JCUser.tests.ps1" + } + windows-latest { + Invoke-Pester -Path "./PowerShell/JumpCloud Module/Tests/Public/Users/Get-JCUser.tests.ps1" + } + } + shell: pwsh + Get-JCUsers2-Test: + needs: setup-pester-environment + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 90 + steps: + - uses: actions/checkout@v2 + - name: Get-JCUsers Tests (pwsh) + env: + XAPIKEY_PESTER: ${{ secrets.XAPIKEY_PESTER }} + run: | + Write-host $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor + Set-PSRepository psgallery -InstallationPolicy trusted + Install-Module -Name Pester -RequiredVersion 5.0.4 -confirm:$false -Force + Install-Module -Name JumpCloud.SDK.V1 -Force + Install-Module -Name JumpCloud.SDK.V2 -Force + Install-Module -Name JumpCloud.SDK.DirectoryInsights -Force + Import-Module "./PowerShell/JumpCloud Module/JumpCloud.psd1" + Connect-JConline ${{ secrets.XAPIKEY_PESTER }} -Force $matrixOS = "${{ matrix.os }}" switch ($matrixOS) { ubuntu-latest {