build: off
shallow_clone: true
platform: x64
clone_folder: C:\projects\ausi-slug-generator

cache:
  - C:\tools\php71 -> appveyor.yml
  - C:\projects\ausi-slug-generator\vendor -> composer.lock
  - '%LOCALAPPDATA%\Composer\files'

init:
  - SET PATH=C:\tools\php71;%PATH%
  - SET PHP=1
  - SET ANSICON=121x90 (121x90)

install:
  - IF EXIST C:\tools\php71 (SET PHP=0)
  - IF %PHP%==1 appveyor-retry cinst -y OpenSSL.Light
  - IF %PHP%==1 appveyor-retry cinst -y php --version 7.1.14
  - IF %PHP%==1 cd C:\tools\php71
  - IF %PHP%==1 copy php.ini-production php.ini
  - IF %PHP%==1 echo date.timezone="UTC" >> php.ini
  - IF %PHP%==1 echo extension_dir=ext >> php.ini
  - IF %PHP%==1 echo extension=php_bz2.dll >> php.ini
  - IF %PHP%==1 echo extension=php_curl.dll >> php.ini
  - IF %PHP%==1 echo extension=php_intl.dll >> php.ini
  - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
  - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
  - cd C:\projects\ausi-slug-generator
  - php -r "readfile('http://getcomposer.org/installer');" | php
  - php composer.phar update --no-progress --no-suggest --no-interaction --ansi

test_script:
  - cd C:\projects\ausi-slug-generator
  - vendor\bin\phpunit.bat
