-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathappveyor.yml
executable file
·44 lines (40 loc) · 1.81 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
build: false
shallow_clone: true
cache:
- .\xp -> appveyor.yml
- vendor -> composer.json
init:
- set PATH=%PATH%;.\xp
- set COMPOSER_NO_INTERACTION=1
- set CACHED=0
install:
- if exist .\xp (set CACHED=1) else (mkdir .\xp)
- if %CACHED%==0 cd .\xp
- if %CACHED%==0 curl -fsS -o php.zip https://windows.php.net/downloads/releases/archives/php-8.2.15-nts-Win32-vs16-x64.zip
- if %CACHED%==0 appveyor DownloadFile https://getcomposer.org/composer.phar
- if %CACHED%==0 appveyor DownloadFile https://baltocdn.com/xp-framework/xp-runners/distribution/downloads/z/zip/xp-runners_8.8.0.zip -FileName xp.zip
- if %CACHED%==0 7z x php.zip -y
- if %CACHED%==0 7z x xp.zip -y
- if %CACHED%==0 cd ..
- ps: |
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null;
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null;
$port = 1433
$instancename = 'SQL2014';
$wmi = New-Object('Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer');
$tcp = $wmi.GetSmoObject("ManagedComputer[@Name='${env:computername}']/ServerInstance[@Name='${instancename}']/ServerProtocol[@Name='Tcp']");
$tcp.IsEnabled = $true;
foreach ($ipAddress in $tcp.IPAddresses)
{
$ipAddress.IPAddressProperties["TcpDynamicPorts"].Value = ""
$ipAddress.IPAddressProperties["TcpPort"].Value = "${port}"
}
$tcp.Alter();
Start-Service -Name "MSSQL`$$instancename";
- sqlcmd -S tcp:localhost,1433 -U sa -P Password12! -Q "create database test"
- set MSSQL_DSN=mssql://sa:Password12!@localhost:1433/test
test_script:
- php -d extension_dir=.\xp\ext -d extension=php_openssl.dll .\xp\composer.phar install --prefer-dist
- echo vendor/autoload.php > composer.pth
- xp test src/test/php
- xp test src/it/php