From 94282da9c6063fb7db709df00814b8ce4771fce4 Mon Sep 17 00:00:00 2001 From: merefield Date: Sun, 23 Aug 2026 15:56:06 +0100 Subject: [PATCH 1/2] Clean up Bats workflow setup --- .github/workflows/ci.yml | 6 +++++- .github/workflows/release.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7978c20..80837a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,13 @@ jobs: - name: Setup Bats if: runner.os == 'Linux' - uses: bats-core/bats-action@3.0.1 + uses: bats-core/bats-action@4.0.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} + support-install: false + assert-install: false + detik-install: false + file-install: false - name: Check formatting if: runner.os != 'Windows' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b74dcb..ce733fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,9 +81,13 @@ jobs: cache: true - name: Setup Bats if: runner.os == 'Linux' - uses: bats-core/bats-action@3.0.1 + uses: bats-core/bats-action@4.0.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} + support-install: false + assert-install: false + detik-install: false + file-install: false - name: Check formatting if: runner.os != 'Windows' shell: bash From b0040783e5cdb50b40b10b4cdb886707c5ec0566 Mon Sep 17 00:00:00 2001 From: merefield Date: Sun, 23 Aug 2026 16:01:17 +0100 Subject: [PATCH 2/2] Harden Windows fixture startup --- test/install-release.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/install-release.ps1 b/test/install-release.ps1 index 98474cf..a92409a 100644 --- a/test/install-release.ps1 +++ b/test/install-release.ps1 @@ -53,12 +53,15 @@ with open(sys.argv[2], "w", encoding="ascii") as port_file: server.serve_forever() '@ $serverProcess = Start-Process -FilePath $python.Source -ArgumentList @($serverScript, $serverRoot, $portFile) -PassThru - for ($attempt = 0; $attempt -lt 50 -and -not (Test-Path -LiteralPath $portFile); $attempt++) { + $port = "" + for ($attempt = 0; $attempt -lt 50; $attempt++) { if ($serverProcess.HasExited) { throw "fixture HTTP server exited before reporting its port" } + if (Test-Path -LiteralPath $portFile) { + $port = ([string](Get-Content -LiteralPath $portFile -Raw)).Trim() + if ($port -match '^\d+$') { break } + } Start-Sleep -Milliseconds 100 } - if (-not (Test-Path -LiteralPath $portFile)) { throw "fixture HTTP server did not report its port" } - $port = (Get-Content -LiteralPath $portFile -Raw).Trim() if ($port -notmatch '^\d+$') { throw "fixture HTTP server reported an invalid port: $port" } $baseUrl = "http://127.0.0.1:$port" $webRequestArgs = @{}