Skip to content

Commit b47cd2c

Browse files
committed
🔧 Improve MySQL setup and configuration handling in CI workflow
1 parent 9718043 commit b47cd2c

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

‎.github/workflows/phpmyadmin-test.yml‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,13 @@ jobs:
584584
Write-Host "`nTest 1: Setting up MySQL service..."
585585
try {
586586
# Download and setup MySQL (using Chocolatey for quick setup)
587-
Write-Host "Installing MySQL via Chocolatey..."
588-
choco install mysql -y --version=8.0.33 --params="/port:3306" 2>&1 | Out-Null
587+
Write-Host "Installing MySQL via Chocolatey (this may take 3-5 minutes)..."
588+
$chocoOutput = choco install mysql -y --version=8.0.33 --params="/port:3306" 2>&1
589+
Write-Host "Chocolatey output: $chocoOutput"
589590
590-
# Wait for MySQL service to start
591-
Start-Sleep -Seconds 10
591+
# Wait for MySQL service to start (increased timeout)
592+
Write-Host "Waiting for MySQL service to start..."
593+
Start-Sleep -Seconds 30
592594
593595
# Check if MySQL service is running
594596
$mysqlService = Get-Service -Name "MySQL" -ErrorAction SilentlyContinue
@@ -638,18 +640,18 @@ jobs:
638640
Write-Host "`nTest 3: Creating phpMyAdmin configuration..."
639641
try {
640642
$configPath = Join-Path $phpmyadminPath "config.inc.php"
641-
$configContent = @"
643+
$configContent = @'
642644
<?php
643-
`$cfg['blowfish_secret'] = 'test-secret-key-for-ci-testing-only';
644-
`$cfg['Servers'][1]['auth_type'] = 'config';
645-
`$cfg['Servers'][1]['host'] = 'localhost';
646-
`$cfg['Servers'][1]['user'] = 'pma_test';
647-
`$cfg['Servers'][1]['password'] = 'test_password';
648-
`$cfg['Servers'][1]['AllowNoPassword'] = false;
649-
`$cfg['DefaultLang'] = 'en';
650-
`$cfg['ServerDefault'] = 1;
645+
$cfg['blowfish_secret'] = 'test-secret-key-for-ci-testing-only';
646+
$cfg['Servers'][1]['auth_type'] = 'config';
647+
$cfg['Servers'][1]['host'] = 'localhost';
648+
$cfg['Servers'][1]['user'] = 'pma_test';
649+
$cfg['Servers'][1]['password'] = 'test_password';
650+
$cfg['Servers'][1]['AllowNoPassword'] = false;
651+
$cfg['DefaultLang'] = 'en';
652+
$cfg['ServerDefault'] = 1;
651653
?>
652-
"@
654+
'@
653655
Set-Content -Path $configPath -Value $configContent
654656
655657
if (Test-Path $configPath) {
@@ -792,7 +794,7 @@ jobs:
792794
$phase1_1 = "${{ steps.download-phpmyadmin.outputs.success }}" -eq "true"
793795
$phase1_2 = "${{ steps.verify-phpmyadmin.outputs.success }}" -eq "true"
794796
$phase2 = "${{ steps.test-basic.outputs.success }}" -eq "true"
795-
$phase3 = "${{ steps.test-database.outputs.success }}" -eq "true" -or "${{ steps.test-database.outputs.success }}" -eq "partial"
797+
$phase3 = "${{ steps.test-database.outputs.success }}" -eq "true"
796798
797799
# Get error messages if any
798800
$error1_1 = "${{ steps.download-phpmyadmin.outputs.error }}"

0 commit comments

Comments
 (0)