-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
72 lines (66 loc) · 3.08 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
build: false
clone_folder: c:\projects\smtp_client
clone_depth: 1
platform:
- x64
environment:
matrix:
- dependencies: current
php_ver_target: 7.3
- dependencies: lowest
php_ver_target: 7.3
- dependencies: highest
php_ver_target: 7.3
project_directory: c:\projects\smtp_client
composer_directory: c:\tools\composer
composer_executable: c:\tools\composer\composer.phar
composer_installer: c:\tools\composer\installer.php
php_directory: c:\tools\php
cache:
- c:\ProgramData\chocolatey\bin -> appveyor.yml
- c:\ProgramData\chocolatey\lib -> appveyor.yml
- c:\tools\composer -> appveyor.yml
- '%LOCALAPPDATA%\Composer -> appveyor.yml'
- c:\tools\php -> appveyor.yml
init:
- ps: $Env:PATH = $Env:php_directory + ';' + $Env:composer_directory + ';' + $Env:PATH
- SET PATH=C:\Program Files\OpenSSL;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- SET ANSICON=121x90 (121x90)
install:
# Install Redis
- nuget install redis-64 -excludeversion
- redis-64\tools\redis-server.exe --service-install
- redis-64\tools\redis-server.exe --service-start
# Install PHP
- ps: If ((Test-Path $Env:php_directory) -eq $False) { New-Item -Path $Env:php_directory -ItemType 'directory' }
- ps: $php_install_parameters = '"/DontAddToPath /InstallDir:' + $Env:php_directory + '"'
- ps: appveyor-retry choco upgrade php --yes --version=$Env:exact_php_version --params=$php_install_parameters
# Prepare PHP
- ps: cd $Env:php_directory
- ps: Copy-Item php.ini-production -Destination php.ini
- ps: Add-Content -Path php.ini -Value 'memory_limit=1G'
- ps: Add-Content -Path php.ini -Value 'date.timezone="UTC"'
- ps: Add-Content -Path php.ini -Value 'extension_dir=ext'
- ps: Add-Content -Path php.ini -Value 'extension=php_curl.dll'
- ps: Add-Content -Path php.ini -Value 'extension=php_mbstring.dll'
- ps: Add-Content -Path php.ini -Value 'extension=php_openssl.dll'
- ps: Add-Content -Path php.ini -Value 'extension=php_intl.dll'
- ps: Add-Content -Path php.ini -Value 'extension=php_fileinfo.dll'
- ps: Add-Content -Path php.ini -Value 'extension=php_gd2.dll'
- ps: php --version
# Prepare composer
- ps: If ((Test-Path $Env:composer_directory) -eq $False) { New-Item -Path $Env:composer_directory -ItemType 'directory' }
- ps: If ((Test-Path $Env:composer_installer) -eq $False) { appveyor-retry appveyor DownloadFile https://getcomposer.org/installer -FileName $Env:composer_installer }
- ps: If ((Test-Path $Env:composer_executable) -eq $False) { php $Env:composer_installer --install-dir=$Env:composer_directory }
- ps: Set-Content -Path ($Env:composer_directory + '\composer.bat') -Value ('@php ' + $Env:composer_executable + ' %*')
# Install dependencies
- ps: cd $Env:project_directory
- IF %dependencies%==current composer install --no-progress -n
- IF %dependencies%==lowest composer update --prefer-lowest --no-progress -n
- IF %dependencies%==highest composer update --prefer-dist --no-progress -n
## Run the actual test
test_script:
- ps: cd $Env:project_directory
- phpdbg -qrr vendor/phpunit/phpunit/phpunit --coverage-text