mirror of
https://github.com/php/frankenphp.git
synced 2026-03-23 16:42:13 +01:00
ci: fix Windows tests silently passing on failure (#2294)
PowerShell doesn't stop on non-zero exit codes by default. `go test` failures were ignored, and the step reported success because the subsequent caddy tests passed. Caught on this job, which fails but is green: https://github.com/php/frankenphp/actions/runs/23424633971/job/68136742625?pr=2287
This commit is contained in:
2
.github/workflows/windows.yaml
vendored
2
.github/workflows/windows.yaml
vendored
@@ -229,6 +229,8 @@ jobs:
|
||||
$env:PHPRC = Get-Location
|
||||
|
||||
go test -race ./...
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
cd caddy
|
||||
go test -race ./...
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
working-directory: ${{ github.workspace }}\frankenphp
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
"runtime"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -1315,6 +1316,10 @@ func testOpcachePreload(t *testing.T, opts *testOptions) {
|
||||
t.Skip("This test is only supported in PHP 8.3 and above")
|
||||
return
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("opcache.preload is not supported on Windows")
|
||||
return
|
||||
}
|
||||
|
||||
cwd, _ := os.Getwd()
|
||||
preloadScript := cwd + "/testdata/preload.php"
|
||||
|
||||
Reference in New Issue
Block a user