Skip to content

Commit

Permalink
Run those PowerShell tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed May 7, 2024
1 parent 33c7f42 commit 66a09f5
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,25 @@ jobs:
run: |
Import-Module Pester
Import-Module ./dist/WinTuner/WinTuner.psd1
./tests/WinTuner.Cmdlets.Tests/run.ps1
$pesterConfig = [PesterConfiguration]@{
Output = @{
Verbosity = "Normal"
}
OutputFormat = "NUnitXML"
TestResult = @{
Enabled = $true
Path = "${{ github.workspace }}/TestResults.xml"
Format = "NUnitXML"
}
Run = @{
Path = "./tests/WinTuner.Cmdlets.Tests"
Exit = $true
}
Should = @{
ErrorAction = "Continue"
}
}
Invoke-Pester -Configuration $pesterConfig -Passthru
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
Expand Down
4 changes: 4 additions & 0 deletions tests/WinTuner.Cmdlets.Tests/Deploy-WtMsStoreApp.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'Deploy-WtMsStoreApp' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'Deploy-WtMsStoreApp'
Expand Down
4 changes: 4 additions & 0 deletions tests/WinTuner.Cmdlets.Tests/Deploy-WtWin32App.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'Deploy-WtWin32App' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'Deploy-WtWin32App'
Expand Down
4 changes: 4 additions & 0 deletions tests/WinTuner.Cmdlets.Tests/Get-WtWin32Apps.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'Get-WtWin32Appsp' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'Get-WtWin32Apps'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'New-IntuneWinPackage' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'New-IntuneWinPackage'
Expand Down
4 changes: 4 additions & 0 deletions tests/WinTuner.Cmdlets.Tests/NewWtWingetPackage.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'New-WtWingetPackage' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'New-WtWingetPackage'
Expand Down
4 changes: 4 additions & 0 deletions tests/WinTuner.Cmdlets.Tests/RemoveWtWin32App.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'Remove-WtWin32App' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'Remove-WtWin32App'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BeforeAll {
Import-Module ./dist/WinTuner/WinTuner.psd1
}

Describe 'Update-WtIntuneApp' {
It 'Should be available' {
$cmdlet = Get-Command -Name 'Update-WtIntuneApp'
Expand Down

0 comments on commit 66a09f5

Please sign in to comment.