Skip to content

Commit

Permalink
Windows系CIサーバーAppVeyorを使ってIIS環境でのテストを行う
Browse files Browse the repository at this point in the history
add appveyor.yml
composer.jsonにPHPUnitを追加
  • Loading branch information
kimoto committed Aug 13, 2014
1 parent 93e1ace commit c24a74b
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
66 changes: 66 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml

# Set build version format here instead of in the admin panel.
version: "1.0.{build}"

# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input

environment:
global:
USER: "root"
DBNAME: "myapp_test"
DBPASS: " "
DBUSER: "root"
matrix:
- db: mysql
provider: mysql

services:
- iis

# Install scripts. (runs after repo cloning)
install:
# Set MySQL.
- cp tests/my.cnf c:\
- cinst mysql
- SET PATH=C:\tools\mysql\current\bin\;%PATH%
# Set bash.
- cinst mingw-get
- set PATH=%PATH%;C:\MinGW\msys\1.0\bin;C:\MinGW\bin
- mingw-get install mingw-developer-toolkit
## Set PHP.
- cinst php
- SET PATH=C:\php\;%PATH%
- cd c:\php
- copy php.ini-production php.ini
- echo date.timezone="Asia/Tokyo" >> php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_gd2.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_mysql.dll >> php.ini
- echo extension=php_curl.dll >> php.ini
- echo output_buffering = Off >> php.ini
- echo default_charset = UTF-8 >> php.ini
- echo mbstring.language = Japanese >> php.ini
- echo mbstring.encoding_translation = On >> php.ini
- echo mbstring.http_input = UTF-8 >> php.ini
- echo mbstring.http_output = pass >> php.ini
- echo mbstring.internal_encoding = UTF-8 >> php.ini
- cd C:\projects\ec-cube
- php -r "readfile('https://getcomposer.org/installer');" | php
- php composer.phar install

# Don't actually build.
build: off

before_test:
- bash eccube_install.sh mysql
- cp tests/require.php.jenkins tests/require.php

test_script:
- php -i
- vendor\bin\phpunit.bat --bootstrap data\config\config.php --configuration tests\phpunit.xml.jenkins tests
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require-dev": {
"satooshi/php-coveralls": "dev-master"
"satooshi/php-coveralls": "dev-master",
"phpunit/phpunit": "3.7.*"
}
}
10 changes: 10 additions & 0 deletions tests/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[mysqld]
#default-character-set=utf8
character-set-server = utf8
skip-character-set-client-handshake
#collation-server = utf8_general_ci
#max_prepared_stmt_count=2000000

[client]
#default-character-set=utf8
#character-set-server = utf8

0 comments on commit c24a74b

Please sign in to comment.