2222 matrix :
2323 include :
2424 - db : ' none'
25- php : ' 8.1 '
25+ php : ' 8.2 '
2626 NOTESTS : 1
2727
2828 name : PHP ${{ matrix.php }} - ${{ matrix.db }}
@@ -105,50 +105,42 @@ jobs:
105105 strategy :
106106 matrix :
107107 include :
108- - php : ' 8.1 '
108+ - php : ' 8.2 '
109109 db : " mariadb:10.2"
110- - php : ' 8.1 '
110+ - php : ' 8.2 '
111111 db : " mariadb:10.3"
112- - php : ' 8.1 '
112+ - php : ' 8.2 '
113113 db : " mariadb:10.4"
114- - php : ' 8.1 '
114+ - php : ' 8.2 '
115115 db : " mariadb:10.6"
116- - php : ' 8.1 '
116+ - php : ' 8.2 '
117117 db : " mariadb:10.9"
118- - php : ' 8.1 '
118+ - php : ' 8.2 '
119119 db : " mariadb:10.10"
120- - php : ' 8.1 '
120+ - php : ' 8.2 '
121121 db : " mariadb:10.11"
122- - php : ' 8.1 '
123- db : " mysql:5.7 "
122+ - php : ' 8.2 '
123+ db : " mysql:8.0 "
124124 db_alias : " MySQL Slow Tests"
125125 SLOWTESTS : 1
126- - php : ' 8.1 '
127- db : " mysql:5.7 "
126+ - php : ' 8.2 '
127+ db : " mysql:8.0 "
128128 db_alias : " MyISAM Tests"
129129 MYISAM : 1
130- - php : ' 8.1'
131- db : " mysql:5.7"
132- - php : ' 8.1'
133- db : " mysql:8.0"
134- - php : ' 8.1'
135- db : " mysql:8.1"
136130 - php : ' 8.2'
137131 db : " mysql:8.0"
138132 - php : ' 8.2'
139- db : " mariadb:10.2 "
140- - php : ' 8.3 '
141- db : " mysql:5.7 "
133+ db : " mysql:8.4 "
134+ - php : ' 8.2 '
135+ db : " mysql:9.4 "
142136 - php : ' 8.3'
143- db : " mariadb:10.2"
144- - php : ' 8.4'
145137 db : " mysql:8.0"
146138 - php : ' 8.4'
147- db : " mariadb:10.3 "
139+ db : " mysql:8.4 "
148140 - php : ' 8.5'
149- db : " mysql:8.0 "
141+ db : " mysql:8.4 "
150142 - php : ' 8.5'
151- db : " mariadb:10.3 "
143+ db : " mysql:9.4 "
152144
153145 name : PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
154146
@@ -234,7 +226,7 @@ jobs:
234226 .github/setup-ldap.sh
235227
236228 - name : Setup node
237- uses : actions/setup-node@v4
229+ uses : actions/setup-node@v6
238230 with :
239231 node-version : 20
240232 - name : Setup node dependencies
@@ -268,24 +260,22 @@ jobs:
268260 strategy :
269261 matrix :
270262 include :
271- - php : ' 8.1 '
263+ - php : ' 8.2 '
272264 db : " postgres:9.5"
273- - php : ' 8.1 '
265+ - php : ' 8.2 '
274266 db : " postgres:9.6"
275- - php : ' 8.1 '
267+ - php : ' 8.2 '
276268 db : " postgres:10"
277- - php : ' 8.1 '
269+ - php : ' 8.2 '
278270 db : " postgres:11"
279- - php : ' 8.1 '
271+ - php : ' 8.2 '
280272 db : " postgres:12"
281- - php : ' 8.1 '
273+ - php : ' 8.2 '
282274 db : " postgres:13"
283- - php : ' 8.1 '
275+ - php : ' 8.2 '
284276 db : " postgres:14"
285- - php : ' 8.1'
286- db : " postgres:15"
287277 - php : ' 8.2'
288- db : " postgres:9.5 "
278+ db : " postgres:15 "
289279 - php : ' 8.3'
290280 db : " postgres:9.5"
291281 - php : ' 8.4'
@@ -374,7 +364,7 @@ jobs:
374364 .github/setup-database.sh $DB $MYISAM
375365
376366 - name : Setup node
377- uses : actions/setup-node@v4
367+ uses : actions/setup-node@v6
378368 with :
379369 node-version : 20
380370 - name : Setup node dependencies
@@ -392,12 +382,12 @@ jobs:
392382 strategy :
393383 matrix :
394384 include :
395- - php : ' 8.1 '
385+ - php : ' 8.2 '
396386 db : " sqlite3"
397- - php : ' 8.1 '
387+ - php : ' 8.2 '
398388 db : " mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
399389 db_alias : ' MSSQL 2019'
400- - php : ' 8.1 '
390+ - php : ' 8.2 '
401391 db : " mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
402392 db_alias : ' MSSQL 2022'
403393
@@ -487,7 +477,7 @@ jobs:
487477 .github/setup-database.sh $DB $MYISAM
488478
489479 - name : Setup node
490- uses : actions/setup-node@v4
480+ uses : actions/setup-node@v6
491481 with :
492482 node-version : 20
493483 - name : Setup node dependencies
@@ -504,11 +494,10 @@ jobs:
504494 runs-on : windows-2025
505495 strategy :
506496 matrix :
507- type : ['unit', 'functional']
508- php : ['8.4']
497+ php : ['8.2', '8.3', '8.4', '8.5']
509498 db : ['postgres']
510499
511- name : Windows - ${{ matrix.type }} - PHP ${{ matrix.php }} - ${{ matrix.db }}
500+ name : Windows - PHP ${{ matrix.php }} - ${{ matrix.db }}
512501
513502 steps :
514503 - name : Prepare git for Windows
@@ -544,6 +533,9 @@ jobs:
544533 GITHUB_WORKSPACE : ${{ github.workspace }}
545534 TEMP_DIR : ${{ runner.temp }}
546535 run : |
536+ # Disable Windows Defender real-time monitoring early to improve performance
537+ Set-MpPreference -DisableRealtimeMonitoring $true
538+
547539 Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-WebServerManagementTools, IIS-CGI -All
548540 Set-Service wuauserv -StartupType Manual
549541 (Get-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config).replace("<configuration>", "<configuration>`n`t<system.web>`n`t`t<customErrors mode=`"Off`"/>`n`t</system.web>") | Set-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config
@@ -564,16 +556,38 @@ jobs:
564556 New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either
565557 iisreset
566558 NET START W3SVC
567- mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test"
568- mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\installer"
569- icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant Users:F /T
570- icacls "${env:GITHUB_WORKSPACE}\phpBB\files" /grant Users:F /T
571- icacls "${env:GITHUB_WORKSPACE}\phpBB\store" /grant Users:F /T
572- icacls "${env:GITHUB_WORKSPACE}\phpBB\ext" /grant Users:F /T
573- icacls "${env:GITHUB_WORKSPACE}\phpBB\vendor-ext" /grant Users:F /T
574- icacls "${env:GITHUB_WORKSPACE}\phpBB\composer-ext.json" /grant Users:F /T
575- icacls "${env:GITHUB_WORKSPACE}\phpBB\composer-ext.lock" /grant Users:F /T
576- icacls "${env:GITHUB_WORKSPACE}\phpBB\images\avatars\upload" /grant Users:F /T
559+
560+ # Wait for IIS to be ready and test connectivity
561+ Start-Sleep -Seconds 10
562+ try {
563+ $response = Invoke-WebRequest -Uri "http://phpbb.test/" -UseBasicParsing -TimeoutSec 30
564+ Write-Host "Web server is responding: $($response.StatusCode)"
565+ } catch {
566+ Write-Host "Web server test failed: $_"
567+ }
568+
569+ # Create directories and set permissions more efficiently
570+ $dirs = @("cache\test", "cache\installer")
571+ foreach ($dir in $dirs) {
572+ New-Item -Path "${env:GITHUB_WORKSPACE}\phpBB\$dir" -ItemType Directory -Force
573+ }
574+
575+ # Set permissions in batch for better performance
576+ $paths = @("cache", "files", "store", "ext", "vendor-ext", "images\avatars\upload")
577+ foreach ($path in $paths) {
578+ if (Test-Path "${env:GITHUB_WORKSPACE}\phpBB\$path") {
579+ icacls "${env:GITHUB_WORKSPACE}\phpBB\$path" /grant Users:F /T /Q
580+ }
581+ }
582+
583+ # Set permissions for specific files
584+ $files = @("composer-ext.json", "composer-ext.lock")
585+ foreach ($file in $files) {
586+ if (Test-Path "${env:GITHUB_WORKSPACE}\phpBB\$file") {
587+ icacls "${env:GITHUB_WORKSPACE}\phpBB\$file" /grant Users:F /Q
588+ }
589+ }
590+
577591 $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("IIS_IUSRS", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow")
578592 $acl = Get-ACL "${env:TEMP_DIR}"
579593 $acl.AddAccessRule($accessRule)
@@ -586,7 +600,7 @@ jobs:
586600 $postgreSqlSvc = Get-Service "postgresql*"
587601 Set-Service $postgreSqlSvc.Name -StartupType manual
588602 $runningStatus = [System.ServiceProcess.ServiceControllerStatus]::Running
589- $maxStartTimeout = New-TimeSpan -Seconds 30
603+ $maxStartTimeout = New-TimeSpan -Seconds 120
590604 try {
591605 $postgreSqlSvc.Start()
592606 $postgreSqlSvc.WaitForStatus($runningStatus, $maxStartTimeout)
@@ -595,25 +609,28 @@ jobs:
595609 }
596610 [System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";${env:PGBIN}")
597611 $env:PGPASSWORD = 'root'
598- psql -c 'ALTER SYSTEM SET hot_standby = on;' -U postgres
599- psql -c 'ALTER SYSTEM SET wal_level = minimal;' -U postgres
612+
613+ # Optimize PostgreSQL for testing performance
614+ psql -c "ALTER SYSTEM SET fsync = off;" -U postgres
615+ psql -c "ALTER SYSTEM SET synchronous_commit = off;" -U postgres
616+ psql -c "ALTER SYSTEM SET checkpoint_completion_target = 0.9;" -U postgres
617+ psql -c "ALTER SYSTEM SET wal_buffers = '16MB';" -U postgres
618+ psql -c "ALTER SYSTEM SET shared_buffers = '128MB';" -U postgres
600619 psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres
601620 psql -c 'create database phpbb_tests;' -U postgres
621+
602622 Set-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender
603- Set-MpPreference -DisableRealtimeMonitoring $true
604623
605624 - name : Setup node
606- uses : actions/setup-node@v4
625+ uses : actions/setup-node@v6
607626 with :
608627 node-version : 20
609628 - name : Setup node dependencies
610629 run : npm ci
611630
612631 - name : Run unit tests
613- if : ${{ matrix.type == 'unit' }}
614- run : |
615- phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --display-all-issues --stop-on-error --exclude-group functional,slow
616- - name : Run functional tests
617- if : ${{ matrix.type == 'functional' }}
618- run : |
619- phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --display-all-issues --stop-on-error --group functional
632+ uses : nick-fields/retry@v3
633+ with :
634+ timeout_minutes : 15
635+ max_attempts : 3
636+ command : phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --display-all-issues --stop-on-error --exclude-group functional,slow
0 commit comments