diff --git a/.github/workflows/soak.yml b/.github/workflows/soak.yml new file mode 100644 index 0000000..c757a45 --- /dev/null +++ b/.github/workflows/soak.yml @@ -0,0 +1,46 @@ +name: Soak + +# The soak test. It runs before a release (a version's branch is release/X.Y or +# version/X.Y), on a pull request that changes the test or this file, and by +# hand. Not a required check, so other pull requests don't wait for it. +on: + push: + branches: ['release/**', 'version/**'] + pull_request: + paths: + - 'Testing/soak/**' + - '.github/workflows/soak.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + # Windows PowerShell 5.1. soak-pwsh is the same on PowerShell 7: keep the two + # in step. + soak: + name: Soak + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - name: Run Testing/soak/run.ps1 + shell: powershell + run: | + & powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Testing\soak\run.ps1 + exit $LASTEXITCODE + + # PowerShell 7. Keep in step with soak. + soak-pwsh: + name: Soak (PowerShell 7) + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - name: Run Testing/soak/run.ps1 under pwsh + shell: pwsh + run: | + & pwsh -NoProfile -ExecutionPolicy Bypass -File .\Testing\soak\run.ps1 + exit $LASTEXITCODE diff --git a/README.md b/README.md index d114d1c..e7d2f61 100644 --- a/README.md +++ b/README.md @@ -641,7 +641,7 @@ powershell -NoProfile -File .\ParallelKit.Harness.ps1 It takes about five and a half minutes. It prints a `[PASS]`/`[FAIL]` line per check and exits 0 only if everything passed. A few checks send real Ctrl+C, Ctrl+Break and window-close events to child PowerShell processes in hidden consoles of their own, never to yours. Where a machine can't deliver those, they print `[SKIP]` with the reason instead; set `PK_HARNESS_NO_SKIP=1` to count skips as failures. A few `message handler failed` lines in the output are expected: some checks break the message handler on purpose to test the fallback. `-Section AO,BB` runs only those sections (and A, the setup), for working on one area; it isn't a full pass, and its last line says so. -GitHub runs the same harness on Windows PowerShell 5.1 and on PowerShell 7 for every pull request and every change to `main`. The harness is the only test GitHub runs: the scripts in `Testing/` below are run by hand. +GitHub runs the same harness on Windows PowerShell 5.1 and on PowerShell 7 for every pull request and every change to `main`. It also runs the soak test below on both before each release ([runs](https://github.com/HalRiveria/PowerShell-ParallelKit/actions/workflows/soak.yml)). The other scripts in `Testing/` are run by hand. `Testing/` holds the longer stress tests and checks behind some of what this README says. They aren't part of the test suite and aren't needed to use the kit: