@@ -46,34 +46,18 @@ jobs:
4646 steps :
4747 - uses : actions/checkout@v4
4848
49- - name : Set up Python 3.10
50- uses : actions/setup-python@v5
51- with :
52- python-version : " 3.10"
53-
54- - name : Install Python Dependencies
55- run : |
56- python3 -m pip install -r tests/requirements.txt
57-
58- - name : Get Version
59- run : |
60- # We need to get the version here and make it an environment variable
61- # It is used to install via svtminion and in the test
62- # The version is in the instance name
63- $instance = "${{ matrix.instance }}"
64- $version = $instance -split "-",2
65- if ( $version.Count -gt 1 ) {
66- $version = $version[1].Replace("-", ".")
67- }
68- Write-Output "SaltVersion=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
69-
70- - name : VMTools Salt
71- run : |
72- . .\windows\svtminion.ps1 -RunService $false -Version $env:SaltVersion
73-
74- - name : Test svtminion
49+ - name : Test SVT Minion Script
7550 run : |
76- pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
51+ # Make sure we can run the script
52+ try { .\windows\svtminion.ps1 | Out-Null } catch {} finally { if ( $LASTEXITCODE -ne 126 ) { Write-Host "Failed to execute"; exit 1 } else { $LASTEXITCODE = 0 } }
53+ # Make sure we can display help
54+ try { .\windows\svtminion.ps1 -Help | Out-Null } catch {} finally { if ( $LASTEXITCODE -ne 0 ) { Write-Host "Status not 0"; exit 1 } }
55+ # Make sure we get a status
56+ try { .\windows\svtminion.ps1 -Status | Out-Null } catch {} finally { if ( $LASTEXITCODE -ge 100 ) { $LASTEXITCODE = 0 } else { Write-Host "Status: $LASTEXITCODE"; exit 1 } }
57+ # Running functional tests (must be run with powershell -file)
58+ powershell -file .\tests\windows\runtests.ps1
59+ # Running integration tests (must be run with powershell -file)
60+ powershell -file .\tests\windows\runtests.ps1 -Integration
7761
7862 - name : Set Exit Status
7963 if : always()
0 commit comments