|
1 | 1 | build: false |
2 | 2 | platform: |
3 | 3 | - x64 |
4 | | -clone_folder: c:\projects\php-api-client |
| 4 | +clone_folder: c:\projects\php-project-workspace |
5 | 5 |
|
6 | 6 |
|
7 | 7 | ## Build matrix for lowest and highest possible targets |
8 | 8 | environment: |
9 | 9 | matrix: |
10 | 10 | - dependencies: lowest |
| 11 | + php_ver_target: 7.0 |
11 | 12 | - dependencies: current |
| 13 | + php_ver_target: 7.0 |
12 | 14 | - dependencies: highest |
| 15 | + php_ver_target: 7.0 |
13 | 16 |
|
14 | 17 | ## Cache composer bits |
15 | 18 | cache: |
16 | | - - c:\tools\php -> appveyor.yml |
17 | | - - c:\projects\php-api-client\vendor -> composer.lock |
| 19 | + - C:\ProgramData\chocolatey\bin -> appveyor.yml |
| 20 | + - C:\ProgramData\chocolatey\lib -> appveyor.yml |
| 21 | + - C:\tools\php -> appveyor.yml |
18 | 22 | - '%LOCALAPPDATA%\Composer\files -> composer.lock' |
19 | 23 |
|
20 | 24 | ## Set up environment varriables |
21 | 25 | init: |
| 26 | + - SET COMPOSER_ROOT_VERSION=dev-master ## Temporary until we tag first versions |
22 | 27 | - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH% |
23 | 28 | - SET COMPOSER_NO_INTERACTION=1 |
24 | 29 | - SET PHP=1 |
25 | 30 | - SET ANSICON=121x90 (121x90) |
26 | 31 |
|
27 | 32 | ## Install PHP and composer, and run the appropriate composer command |
28 | 33 | install: |
29 | | - - IF EXIST c:\tools\php (SET PHP=0) |
30 | | - - IF %PHP%==1 cinst -y OpenSSL.Light |
31 | | - - IF %PHP%==1 cinst -y php |
32 | | - - cd c:\tools\php |
33 | | - - IF %PHP%==1 copy php.ini-production php.ini /Y |
34 | | - - IF %PHP%==1 echo date.timezone="UTC" >> php.ini |
35 | | - - IF %PHP%==1 echo extension_dir=ext >> php.ini |
36 | | - - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini |
37 | | - - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini |
38 | | - - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini |
39 | | - - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat |
40 | | - - appveyor DownloadFile https://getcomposer.org/composer.phar |
41 | | - - cd c:\projects\php-api-client |
42 | | - - IF %dependencies%==lowest composer update --prefer-lowest --no-progress -n |
43 | | - - IF %dependencies%==current composer install --no-progress |
44 | | - - IF %dependencies%==highest composer update --no-progress -n |
45 | | - - composer show -i |
| 34 | + - ps: IF (!(Test-Path c:\tools\php)) {appveyor-retry cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $Env:php_ver_target | Select-Object -first 1) -replace '[php|]',''); cmd.exe /c 'appveyor.bat'} |
| 35 | + - cd c:\projects\php-project-workspace |
| 36 | + - IF %dependencies%==lowest appveyor-retry composer update --prefer-lowest --no-progress -n |
| 37 | + - IF %dependencies%==current appveyor-retry composer install --no-progress |
| 38 | + - IF %dependencies%==highest appveyor-retry composer update --no-progress -n |
| 39 | + - composer show |
46 | 40 |
|
47 | 41 | ## Run the actual test |
48 | 42 | test_script: |
49 | | - - cd c:\projects\php-api-client |
50 | | - - composer qa-ci-windows |
| 43 | + - cd c:\projects\php-project-workspace |
| 44 | + - vendor/bin/phpunit -c phpunit.xml.dist |
0 commit comments