Skip to content

Fix SABnzbd service + add tests #890

Fix SABnzbd service + add tests

Fix SABnzbd service + add tests #890

Workflow file for this run

name: procexp
on:
pull_request: # Automatic test
types: [opened, reopened, synchronize]
branches: [master]
paths:
- .github/workflows/.common.yml
- .github/workflows/procexp.yml
- procexp/**
- Common.ps1
- update_all.ps1
schedule:
- cron: 0 4 * * * # Scheduled test
- cron: 25 1-23/6 * * * # Scheduled update
workflow_dispatch: # Manual run
inputs:
type:
description: Type
type: choice
required: true
default: Test
options:
- Force update
- Test
- Update
jobs:
job:
name: ${{ inputs.type || (github.event_name == 'pull_request' || github.event.schedule == '0 4 * * *') && 'Test' || 'Update' }}
uses: ./.github/workflows/.common.yml
with:
test: ${{ github.event_name == 'pull_request' || github.event.schedule == '0 4 * * *' || inputs.type == 'Test' }}
force: ${{ inputs.type == 'Force update' }}
test_cases: |
- Start procexp
procexp
$sw = [System.Diagnostics.Stopwatch]::StartNew()
while ($sw.ElapsedMilliseconds -lt 30000) {
if (Get-Process procexp* | Where-Object MainWindowHandle -NE 0) {
return
}
Start-Sleep -Milliseconds 500
}
throw "Process start timed out."
- Close procexp
Get-Process procexp* | Should -Not -BeNullOrEmpty
Get-Process procexp* | ForEach-Object CloseMainWindow | Out-Null
Wait-Process procexp* -Timeout 30
secrets: inherit