Skip to content

Commit

Permalink
invoke pester tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc committed Nov 8, 2023
1 parent d669357 commit 92ea0ad
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/jcapi-powershell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,19 @@ jobs:
PESTER_MSP_APIKEY: ${{ secrets.PESTER_MSP_APIKEY }}
PESTER_PROVIDERID: ${{ secrets.PESTER_PROVIDERID }}
run: |
# Import all the SDKs
$sdks = @('JumpCloud.SDK.DirectoryInsights', 'JumpCloud.SDK.V1', 'JumpCloud.SDK.V2')
foreach ($sdk in $sdks){
Import-Module -Path "/home/runner/work/jcapi-powershell/jcapi-powershell/SDKs/PowerShell/$sdk/$sdk.psd1" -force
}
$ErrorActionPreference = 'stop'
./support\PowerShell\Deploy\SdkSync\jcapiToSupportSync.ps1 -RequiredModulesRepo CodeArtifact
. /home/runner/work/support/support/PowerShell/Deploy/SdkSync/jcapiToSupportSync.ps1 -RequiredModulesRepo CodeArtifact
# Get functions where 'jcsdk' functions are found
# Private & Public Functions
$pathList = @('Private', 'Public')
# Get matching functions
$functions = $pathList | ForEach-Object {
Get-ChildItem "./support/PowerShell/Jumpcloud Module/$($_)/*.ps1" -Recurse
Get-ChildItem "/home/runner/work/support/support/PowerShellJumpcloud Module/$($_)/*.ps1" -Recurse
}
$testTags = @()
# For each function file
Expand All @@ -234,5 +239,5 @@ jobs:
# At this time only associations need to be added:
$tags += 'JCAssociation'
# Invoke Pester
. "./support/PowerShell/JumpCloud Module/Tests/InvokePester.ps1" -JumpCloudApiKey $env:PESTER_APIKEY -JumpCloudApiKeyMsp $env:PESTER_MSP_APIKEY -ExcludeTagList:('None') -IncludeTagList:($tags) -RequiredModulesRepo:('CodeArtifact')
. /home/runner/work/support/support/PowerShell/JumpCloud Module/Tests/InvokePester.ps1" -JumpCloudApiKey $env:PESTER_APIKEY -ExcludeTagList:('MSP') -IncludeTagList:($tags) -RequiredModulesRepo:('PSGallery')

0 comments on commit 92ea0ad

Please sign in to comment.