-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
91 lines (78 loc) · 3.69 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
build: false
clone_folder: c:\projects\wmi-scripting
init:
- SET COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90)
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
environment:
DEPLOY_DOCS: "false"
matrix:
- PHP_VERSION: "7.1.25"
PHP_DIR: "php71"
XDEBUG: "https://xdebug.org/files/php_xdebug-2.8.0beta1-7.1-vc14-nts-x86_64.dll"
- PHP_VERSION: "7.2.20"
PHP_DIR: "php72"
XDEBUG: "https://xdebug.org/files/php_xdebug-2.8.0beta1-7.2-vc15-nts-x86_64.dll"
- PHP_VERSION: "7.3.8"
PHP_DIR: "php73"
XDEBUG: "https://xdebug.org/files/php_xdebug-2.8.0beta1-7.3-vc15-nts-x86_64.dll"
DEPLOY_DOCS: "true"
matrix:
fast_finish: true
cache:
- composer.phar
- ocular.phar
- node_modules -> package.json
- c:\projects\wmi-scripting\vendor -> composer.json
- c:\tools\%PHP_DIR%
install:
- SET PATH=c:\tools\%PHP_DIR%;%PATH%
- IF NOT EXIST c:\tools\%PHP_DIR%\php.exe (
cinst -y php -i --version %PHP_VERSION% &&
cd c:\tools\%PHP_DIR% &&
echo extension_dir=ext >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_openssl.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_curl.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_mbstring.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_pdo_mysql.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_pdo_sqlite.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_fileinfo.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_gd2.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_ftp.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo extension=php_com_dotnet.dll >> c:\tools\%PHP_DIR%\php.ini &&
echo memory_limit=256M >> c:\tools\%PHP_DIR%\php.ini &&
echo curl.cainfo=C:\tools\cacert.pem >> c:\tools\%PHP_DIR%\php.ini
)
- cd c:\tools
- appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
- cd c:\projects\wmi-scripting
- IF "%DEPLOY_DOCS%" == "true" (
powershell -command "&{
$fileContent = \"-----BEGIN RSA PRIVATE KEY-----`n\";
$fileContent += $env:priv_key.Replace(' ', \"`n\");
$fileContent += \"`n-----END RSA PRIVATE KEY-----`n\";
Set-Content $env:userprofile\.ssh\id_rsa $fileContent }" &&
git submodule update --init --recursive &&
git config --global user.email "%GIT_EMAIL%" &&
git config --global user.name "%GIT_USER%" &&
yarn install &&
yarn docs:deploy:windows:ci
)
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar)
- php composer.phar self-update
- php composer.phar update --no-interaction --prefer-dist --no-suggest --ansi --no-progress
before_test:
- IF NOT EXIST c:\tools\%PHP_DIR%\ext\xdebug.dll (appveyor DownloadFile %XDEBUG% -Filename c:\tools\%PHP_DIR%\ext\xdebug.dll)
- copy /Y c:\tools\%PHP_DIR%\php.ini c:\tools\%PHP_DIR%\php.ini.base
- echo zend_extension=xdebug.dll >> c:\tools\%PHP_DIR%\php.ini
test_script:
- SET X=0
- vendor\bin\phpunit --coverage-clover coverage.clover --configuration phpunit.xml --log-junit junit-results.xml || SET X=!errorlevel!
- exit %X%
after_test:
- ps: |
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\junit-results.xml))
- copy /Y c:\tools\%PHP_DIR%\php.ini.base c:\tools\%PHP_DIR%\php.ini
- IF NOT EXIST ocular.phar (appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.6.0/ocular.phar)
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover