diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index f69527a..bc7fbc0 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -46,34 +46,18 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Install Python Dependencies - run: | - python3 -m pip install -r tests/requirements.txt - - - name: Get Version - run: | - # We need to get the version here and make it an environment variable - # It is used to install via svtminion and in the test - # The version is in the instance name - $instance = "${{ matrix.instance }}" - $version = $instance -split "-",2 - if ( $version.Count -gt 1 ) { - $version = $version[1].Replace("-", ".") - } - Write-Output "SaltVersion=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - - name: VMTools Salt - run: | - . .\windows\svtminion.ps1 -RunService $false -Version $env:SaltVersion - - - name: Test svtminion + - name: Test SVT Minion Script run: | - pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/ + # Make sure we can run the script + try { .\windows\svtminion.ps1 | Out-Null } catch {} finally { if ( $LASTEXITCODE -ne 126 ) { Write-Host "Failed to execute"; exit 1 } else { $LASTEXITCODE = 0 } } + # Make sure we can display help + try { .\windows\svtminion.ps1 -Help | Out-Null } catch {} finally { if ( $LASTEXITCODE -ne 0 ) { Write-Host "Status not 0"; exit 1 } } + # Make sure we get a status + try { .\windows\svtminion.ps1 -Status | Out-Null } catch {} finally { if ( $LASTEXITCODE -ge 100 ) { $LASTEXITCODE = 0 } else { Write-Host "Status: $LASTEXITCODE"; exit 1 } } + # Running functional tests (must be run with powershell -file) + powershell -file .\tests\windows\runtests.ps1 + # Running integration tests (must be run with powershell -file) + powershell -file .\tests\windows\runtests.ps1 -Integration - name: Set Exit Status if: always()