Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 16 additions & 27 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,23 @@ 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
Write-Host "Run Script (no parameters)"
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
Write-Host "Run Script (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
Write-Host "Run Script (get 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)
Write-Host "Run Unit Tests"
powershell -file .\tests\windows\runtests.ps1
# Running integration tests (must be run with powershell -file)
Write-Host "Run Integration Tests"
powershell -file .\tests\windows\runtests.ps1 -Integration

- name: Set Exit Status
if: always()
Expand Down
Loading