From 6c43c50e4c7857deba45bf08a2a307bd723dd650 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 4 Nov 2015 18:23:07 +0100 Subject: [PATCH] added appveyor.yml --- appveyor.yml | 41 ++++++++++++++++++++++++++++++++++++ readme.md | 1 + tests/databases.appveyor.ini | 23 ++++++++++++++++++++ tests/php-win.ini | 1 + 4 files changed, 66 insertions(+) create mode 100644 appveyor.yml create mode 100644 tests/databases.appveyor.ini diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..9fa219583 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +build: off +cache: + - c:\php -> appveyor.yml + - '%LOCALAPPDATA%\Composer\files -> appveyor.yml' + +clone_folder: c:\projects\database + +services: + - mssql2008r2sp2 + - mssql2012sp1 + - mssql2014 + - mysql + +init: + - SET PATH=c:\php;%PATH% + - SET PHP=1 + - SET ANSICON=121x90 (121x90) + +install: + # Install PHP + - IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php) + - IF %PHP%==1 cd c:\php + - IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.6.14-Win32-VC11-x86.zip + - IF %PHP%==1 7z x php-5.6.14-Win32-VC11-x86.zip >nul + - IF %PHP%==1 echo extension_dir=ext >> php.ini + - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini + - IF %PHP%==1 appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip + - IF %PHP%==1 7z x php-sqlsrv.zip >nul + - IF %PHP%==1 copy SQLSRV\php_pdo_sqlsrv_56_ts.dll ext\php_pdo_sqlsrv_ts.dll + - IF %PHP%==1 del /Q *.zip + - cd c:\projects\database + + # Install Nette Tester + - appveyor DownloadFile https://getcomposer.org/composer.phar + - php composer.phar install --prefer-dist --no-interaction --no-progress + + # Create databases.ini + - copy tests\databases.appveyor.ini tests\Database\databases.ini + +test_script: + - vendor\bin\tester tests -s -p php -c tests\php-win.ini diff --git a/readme.md b/readme.md index 6d12df412..ddf01ab8a 100644 --- a/readme.md +++ b/readme.md @@ -3,6 +3,7 @@ Nette Database [![Downloads this Month](https://img.shields.io/packagist/dm/nette/database.svg)](https://packagist.org/packages/nette/database) [![Build Status](https://travis-ci.org/nette/database.svg?branch=master)](https://travis-ci.org/nette/database) +[![Build Status Windows](https://ci.appveyor.com/api/projects/status/github/nette/database?branch=master&svg=true)](https://ci.appveyor.com/project/nette/database/branch/master) [![Latest Stable Version](https://poser.pugx.org/nette/database/v/stable)](https://github.com/nette/database/releases) [![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/database/blob/master/license.md) diff --git a/tests/databases.appveyor.ini b/tests/databases.appveyor.ini new file mode 100644 index 000000000..6a493ebe6 --- /dev/null +++ b/tests/databases.appveyor.ini @@ -0,0 +1,23 @@ +[mysql] +dsn = "mysql:host=127.0.0.1" +user = root +password = "Password12!" + +[sqlite] +dsn = "sqlite::memory:" + +[sqlsrv 2008] +dsn = "sqlsrv:Server=(local)\SQL2008R2SP2;Database=master" +user = sa +password = "Password12!" + +[sqlsrv 2012] +dsn = "sqlsrv:Server=(local)\SQL2012SP1;Database=master" +user = sa +password = "Password12!" + +; NDB does not differentiate between 2012 and 2014 +;[sqlsrv 2014] +;dsn = "sqlsrv:Server=(local)\SQL2014;Database=master" +;user = sa +;password = "Password12!" diff --git a/tests/php-win.ini b/tests/php-win.ini index bd274e004..7d024ac2e 100644 --- a/tests/php-win.ini +++ b/tests/php-win.ini @@ -3,6 +3,7 @@ extension_dir = "./ext" extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll extension=php_pdo_pgsql.dll +extension=php_pdo_sqlsrv_ts.dll [Zend] ;zend_extension="./ext/php_xdebug-2.0.5-5.3-vc6.dll"