forked from EC-CUBE/mail-magazine-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
82 lines (72 loc) · 2.71 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
# Set build version format here instead of in the admin panel.
version: 4.0.x-{build}
cache:
- '%LOCALAPPDATA%\Composer\files'
- vendor
- bin\.phpunit
# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input
environment:
global:
DATABASE_URL: "mysql://root:Password12!@localhost/myapp_test"
DATABASE_SERVER_VERSION: "5"
BASE_DIR: "C:/projects/ec-cube"
PLUGIN_BASE_DIR: "%APPVEYOR_BUILD_FOLDER%"
ECCUBE_VERSION: "4.0"
BRANCH: "4.0"
PLUGIN_CODE: "MailMagazine4"
matrix:
- db: mysql
provider: mysql
services:
- mysql
# Install scripts. (runs after repo cloning)
install:
- cd %PLUGIN_BASE_DIR%
- git archive -o %PLUGIN_CODE%.tar.gz HEAD
- git clone https://github.com/EC-CUBE/ec-cube.git %BASE_DIR%
- cd %BASE_DIR%
- git checkout origin/%BRANCH%
# see https://github.com/phpmd/phpmd/blob/master/appveyor.yml#L10-L13
- cinst -y OpenSSL.Light --version 1.1.1
- SET PATH=C:\Program Files\OpenSSL;%PATH%
- sc config wuauserv start= auto
- net start wuauserv
# Set MySQL.
- cp tests/my.cnf c:\
- SET PATH=C:\Program Files\MySql\MySQL Server 5.7\bin\;%PATH%
#- cinst mysql
#- SET PATH=C:\tools\mysql\current\bin\;%PATH%
# Set PHP.
- cinst php --version 7.2.8 --allow-empty-checksums
- SET PATH=C:\tools\php72\;%PATH%
- copy C:\tools\php72\php.ini-production C:\tools\php72\php.ini
- echo date.timezone="Asia/Tokyo" >> C:\tools\php72\php.ini
- echo extension_dir=ext >> C:\tools\php72\php.ini
- echo extension=php_gd2.dll >> C:\tools\php72\php.ini
- echo extension=php_mbstring.dll >> C:\tools\php72\php.ini
- echo extension=php_pgsql.dll >> C:\tools\php72\php.ini
- echo extension=php_pdo_mysql.dll >> C:\tools\php72\php.ini
- echo extension=php_pdo_pgsql.dll >> C:\tools\php72\php.ini
- echo extension=php_curl.dll >> C:\tools\php72\php.ini
- echo extension=php_fileinfo.dll >> C:\tools\php72\php.ini
- echo extension=php_intl.dll >> C:\tools\php72\php.ini
- echo extension=php_openssl.dll >> C:\tools\php72\php.ini
- echo memory_limit = 512M >> C:\tools\php72\php.ini
- echo APP_ENV=codeception >> .env
- php -r "readfile('http://getcomposer.org/installer');" | php
- php composer.phar install --dev --no-interaction -o
# Don't actually build.
build: off
before_test:
- php bin\console doctrine:database:create
- php bin\console doctrine:schema:create
- php bin\console eccube:fixtures:load
- php bin\console eccube:plugin:install --path=%PLUGIN_BASE_DIR%/%PLUGIN_CODE%.tar.gz
# enable plugin
- php bin\console eccube:plugin:enable --code=%PLUGIN_CODE%
test_script:
- php bin\phpunit -c app/Plugin/%PLUGIN_CODE%/phpunit.xml.dist