|
| 1 | +build: false |
| 2 | +platform: |
| 3 | + - x86 |
| 4 | + - x64 |
| 5 | +clone_folder: c:\projects\php-pusher-client |
| 6 | + |
| 7 | + |
| 8 | +## Build matrix for lowest and highest possible targets |
| 9 | +environment: |
| 10 | + matrix: |
| 11 | + - dependencies: lowest |
| 12 | + - dependencies: current |
| 13 | + - dependencies: highest |
| 14 | + |
| 15 | +## Cache composer bits |
| 16 | +cache: |
| 17 | + - c:\tools\php -> appveyor.yml |
| 18 | + - '%LOCALAPPDATA%\Composer\files -> composer.lock' |
| 19 | + |
| 20 | +## Set up environment varriables |
| 21 | +init: |
| 22 | + - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH% |
| 23 | + - SET COMPOSER_NO_INTERACTION=1 |
| 24 | + - SET PHP=1 |
| 25 | + - SET ANSICON=121x90 (121x90) |
| 26 | + |
| 27 | +## Install PHP and composer, and run the appropriate composer command |
| 28 | +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-pusher-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 |
| 46 | + |
| 47 | +## Run the actual test |
| 48 | +test_script: |
| 49 | + - cd c:\projects\php-pusher-client |
| 50 | + - vendor/bin/phpunit -c phpunit.xml.dist |
0 commit comments