Add Appveyor test configuration for Windows-based CI

We can't use Travis for our Windows testing, so I have configured this
test run for Appveyor. It will run Windows + MSSQL!
This commit is contained in:
Sam Minnee 2015-08-12 09:43:53 +12:00
parent ade1ea69d7
commit 1ec1ca86aa

42
.appveyor.yml Normal file
View File

@ -0,0 +1,42 @@
build: false
shallow_clone: false
platform: 'x86'
clone_folder: C:\projects\silverstripe
services:
- mssql2014
before_test:
- sqlcmd -S "(local)\SQL2014" -Q "Use [master]; CREATE DATABASE [appveyor]"
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
- cinst -y php -version 5.6.11
- cd c:\tools\php
- ps: cat php.ini-production | %{$_ -replace "memory_limit = 128M","memory_limit = 256M"} | Out-File -Encoding "Default" php.ini
- echo date.timezone="UTC" >> php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_curl.dll >> php.ini
- echo extension=php_gd2.dll >> php.ini
- echo extension=php_tidy.dll >> php.ini
- php -r "readfile('http://getcomposer.org/installer');" | php
- php -r "readfile('https://dl.dropboxusercontent.com/u/7129062/sqlsrv_unofficial_3.0.2.2.zip');" > sqlsrv.zip
- unzip sqlsrv.zip
- copy sqlsrv_unofficial_3.0.2.2\x64\*.dll ext
- echo extension=php_sqlsrv_56_nts.dll >> php.ini
- echo extension=php_pdo_sqlsrv_56_nts.dll >> php.ini
- ps: echo "php c:\tools\php\composer.phar %*" | Out-File -Encoding "Default" composer.bat
- type composer.bat
- composer --version
- git clone --branch=windows-support git://github.com/silverstripe-labs/silverstripe-travis-support.git c:\projects\travis-support
- php c:\projects\travis-support\travis_setup.php --source c:\projects\silverstripe --target c:\projects\assembled
- cd c:\projects\assembled
test_script:
- cd c:\projects\assembled
- ps: cat phpunit.xml.dist | %{$_ -replace "colors=\"true\"","colors=\"false\""} | Out-File -Encoding "Default" phpunit.xml.dist
- php .\vendor\phpunit\phpunit\composer\bin\phpunit framework/tests
environment:
DB: MSSQL
CORE_RELEASE: 3