Skip to content

Merge pull request #1 from SebRoLENS/fix/tcp-scpi-terminator #10

Merge pull request #1 from SebRoLENS/fix/tcp-scpi-terminator

Merge pull request #1 from SebRoLENS/fix/tcp-scpi-terminator #10

Workflow file for this run

name: Validate source
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
validate:
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Parse PowerShell source
shell: pwsh
run: |
$tokens = $null
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile(
(Resolve-Path './PACE_Controller.ps1'),
[ref]$tokens,
[ref]$errors
) | Out-Null
if ($errors.Count -gt 0) {
$errors | Format-List | Out-String | Write-Error
throw "PowerShell parser found $($errors.Count) error(s)."
}
Write-Host 'PowerShell syntax OK.'
- name: Run repository checks
run: python tests/test_project.py
- name: Smoke-test real GUI rendering
shell: powershell
run: |
$output = Join-Path $env:RUNNER_TEMP 'pace-controller-ui.png'
& .\PACE_Controller.ps1 -Language en -ScreenshotPath $output
if (-not (Test-Path $output)) { throw 'GUI screenshot was not generated.' }
$image = [System.Drawing.Image]::FromFile($output)
try {
if ($image.Width -lt 1000 -or $image.Height -lt 650) {
throw "Unexpected screenshot dimensions: $($image.Width)x$($image.Height)"
}
}
finally { $image.Dispose() }
- name: Validate JSON example
shell: pwsh
run: Get-Content examples/routine_esempio.json -Raw | ConvertFrom-Json | Out-Null