Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,19 @@ jobs:
$httpErrors = $webConfigXml.CreateElement('httpErrors')
$httpErrors.SetAttribute('errorMode', 'Detailed')
[void]$systemWebServer.AppendChild($httpErrors)
$appCmd = Join-Path $env:windir 'System32\inetsrv\appcmd.exe'
$rewriteInstalled = $false
try {
choco install urlrewrite -y --no-progress
# Native command failures do not necessarily throw in PowerShell.
if ($LASTEXITCODE -ne 0) {
throw "Chocolatey URL Rewrite installation exited with code $LASTEXITCODE."
}
# Chocolatey can report success even when its feed failed and no packages were installed.
$iisModules = @(& $appCmd list modules /text:MODULE.NAME)
if ($LASTEXITCODE -ne 0 -or $iisModules -notcontains 'RewriteModule') {
throw 'IIS URL Rewrite module is not registered after installation.'
}
$rewriteInstalled = $true
} catch {
Write-Warning "URL Rewrite installation failed; continuing without rewrite-specific IIS configuration. $_"
Expand All @@ -731,6 +737,11 @@ jobs:
New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either
iisreset
NET START W3SVC
$iisConfiguration = & $appCmd list config 'phpBBTest/'
if ($LASTEXITCODE -ne 0) {
Get-Content $webConfig
throw "IIS rejected the phpBB test site configuration: $iisConfiguration"
}
mkdir "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\cache\test"
mkdir "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\cache\installer"
icacls "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\cache" /grant Users:F /T
Expand Down
Loading