mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-03 07:22:50 +02:00
95 lines
4.3 KiB
YAML
95 lines
4.3 KiB
YAML
build: false
|
|
clone_folder: c:\projects\phpbb
|
|
version: '{build}'
|
|
|
|
services:
|
|
- iis
|
|
|
|
environment:
|
|
matrix:
|
|
- db: mssql
|
|
db_version: sql2012sp1
|
|
php: 7.1
|
|
- db: mssql
|
|
db_version: sql2014
|
|
php: 7.1
|
|
- db: mssql
|
|
db_version: sql2016
|
|
php: 7.1
|
|
- db: mssql
|
|
db_version: sql2017
|
|
php: 7.1
|
|
|
|
hosts:
|
|
phpbb.test: 127.0.0.1
|
|
|
|
init:
|
|
- SET PATH=c:\php;%PATH%
|
|
- SET ANSICON=121x90 (121x90)
|
|
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
|
|
|
|
before_test:
|
|
- ps: Set-Service wuauserv -StartupType Manual
|
|
- ps: |
|
|
$instanceName = $env:db_version.ToUpper()
|
|
Start-Service "MSSQL`$$instanceName"
|
|
Set-Variable -Name "sqlServerPath" -Value "(local)\$($env:db_version.ToUpper())"
|
|
Write-Host "$sqlServerPath"
|
|
Write-Host "$env:db_version --> $($env:db_version.ToUpper())"
|
|
sqlcmd -S $sqlServerPath -Q "Use [master]; CREATE DATABASE [phpbb_test] COLLATE Latin1_General_CI_AS"
|
|
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
|
|
- ps: Set-Service wuauserv -StartupType Manual
|
|
- ps: cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern 7.1 | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
|
|
- ps: Get-ChildItem -Path "c:\tools\php71" -Recurse |
|
|
Move-Item -destination "c:\tools\php"
|
|
- cd c:\tools\php
|
|
- ps: cat php.ini-production | %{$_ -replace "memory_limit = 128M","memory_limit = 1024M"} | Out-File -Encoding "Default" php.ini
|
|
- echo date.timezone="UTC" >> php.ini
|
|
- echo display_errors=On >> php.ini
|
|
- echo extension_dir=ext >> php.ini
|
|
- echo extension=php_openssl.dll >> php.ini
|
|
- echo extension=php_mbstring.dll >> php.ini
|
|
- echo extension=php_curl.dll >> php.ini
|
|
- echo extension=php_gd2.dll >> php.ini
|
|
- echo extension=php_tidy.dll >> php.ini
|
|
- echo extension=php_fileinfo.dll >> php.ini
|
|
- ps: |
|
|
cd c:\tools\php\ext
|
|
$DLLVersion = "4.1.6.1"
|
|
appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-7.1-nts-vc14-x64.zip
|
|
7z x -y php_sqlsrv-$($DLLVersion)-7.1-nts-vc14-x64.zip > $null
|
|
appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-7.1-nts-vc14-x64.zip
|
|
7z x -y php_pdo_sqlsrv-$($DLLVersion)-7.1-nts-vc14-x64.zip > $null
|
|
Remove-Item c:\tools\php\* -include .zip
|
|
cd c:\tools\php
|
|
Add-Content php.ini "`nextension=php_sqlsrv.dll"
|
|
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
|
|
Add-Content php.ini "`n"
|
|
- cd c:\projects\phpbb\phpBB
|
|
- php ..\composer.phar install
|
|
- cd c:\projects\phpbb\tests
|
|
- touch test_config.php
|
|
- ps: $data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mssqlnative';`n`$dbhost = '.\\$env:db_version';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'sa';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "test_config.php"
|
|
- choco install -y urlrewrite
|
|
- ps: New-WebSite -Name 'phpBBTest' -PhysicalPath 'c:\projects\phpbb\phpBB' -Force
|
|
- ps: Import-Module WebAdministration; Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}
|
|
- SET PATH=%systemroot%\system32\inetsrv\;%PATH%
|
|
- echo Change default anonymous user AUTH to ApplicationPool
|
|
- appcmd set config -section:anonymousAuthentication /username:"" --password
|
|
- echo Setup FAST-CGI configuration
|
|
- appcmd set config /section:system.webServer/fastCGI /+[fullPath='C:\tools\php\php-cgi.exe']
|
|
- echo Setup FACT-CGI handler
|
|
- appcmd set config /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='C:\tools\php\php-cgi.exe',resourceType='Either']
|
|
- iisreset
|
|
- NET START W3SVC
|
|
- mkdir "C:\projects\phpbb\phpBB\cache\test"
|
|
- mkdir "C:\projects\phpbb\phpBB\cache\installer"
|
|
- icacls "C:\projects\phpbb\phpBB\cache" /grant Users:F /T
|
|
- icacls "C:\projects\phpbb\phpBB\files" /grant Users:F /T
|
|
- icacls "C:\projects\phpbb\phpBB\store" /grant Users:F /T
|
|
- icacls "C:\projects\phpbb\phpBB\images\avatars\upload" /grant Users:F /T
|
|
|
|
test_script:
|
|
- cd c:\projects\phpbb
|
|
- php -e phpBB\vendor\phpunit\phpunit\phpunit --verbose
|