Skip to content

Commit

Permalink
Merge branch 'master' into issue#216
Browse files Browse the repository at this point in the history
Conflicts:
	data/Smarty/templates/admin/main_frame.tpl
	data/Smarty/templates/default/site_frame.tpl
  • Loading branch information
nobuhiko committed Jan 30, 2020
2 parents cd6360f + a164798 commit 8733bfd
Show file tree
Hide file tree
Showing 106 changed files with 17,698 additions and 1,549 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"env",
{
"targets": {
"ie": 11
},
// 必要な分だけのpolyfillを自動でインポート
"useBuiltIns": "usage"
}
]
]
}
44 changes: 44 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
; top-most EditorConfig file
root = true

; Unix-style newlines
[*]
charset = utf-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true

[*.{php,html,tpl,sh,sql,css,xml}]
indent_style = space
indent_size = 4

[*.{yml,yaml,json,js}]
indent_style = space
indent_size = 2

[html/user_data/**.js]
indent_style = space
indent_size = 4

[composer.json]
indent_style = space
indent_size = 4

[ctests/**.{yml,yaml}]
indent_style = space
indent_size = 4

[codeception.yml]
indent_style = space
indent_size = 4

[phpunit.xml{,.dist}]
indent_style = space
indent_size = 4

[.htaccess]
indent_style = space
indent_size = 4

[COMMIT_EDITMSG]
max_line_length = 0
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"env": {
"es6": true,
"browser": true,
"jquery": true
},
"plugins": [
"import"
],
"parser": "babel-eslint",
"extends": "jquery"
}
189 changes: 183 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: CI/CD for EC-CUBE
on:
push:
branches:
- master
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.md'
release:
types: [ published ]

Expand All @@ -13,7 +23,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-18.04 ]
php: [ 5.4, 5.5, 5.6, 7.1, 7.2, 7.3 ]
php: [ 5.4, 5.5, 5.6, 7.1, 7.2, 7.3, 7.4 ]
db: [ mysql, pgsql ]
include:
- db: mysql
Expand Down Expand Up @@ -43,6 +53,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@master

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: nanasess/setup-php@master
with:
Expand Down Expand Up @@ -71,7 +93,11 @@ jobs:
chromedriver-version: '77.0.3865.40'

- name: Run to PHPUnit
run: data/vendor/bin/phpunit --exclude-group classloader
run: |
data/vendor/bin/phpunit --exclude-group classloader
data/vendor/bin/phpunit --group classloader
sed 's|http://|https://|g' -i.bak data/config/config.php
data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php
- name: Run chromedriver
run: |
Expand All @@ -81,18 +107,28 @@ jobs:
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
- name: Run to Codeception
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: myapp_test
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
HTTP_URL: http://localhost:8085/
HTTPS_URL: http://localhost:8085/
run: |
php data/vendor/bin/codecept build
php -S 0.0.0.0:8085 -t html/ &
php data/vendor/bin/codecept run --env chrome --steps
php data/vendor/bin/codecept run --env chrome --skip-group installer --steps
run-on-windows:
name: Run on Windows
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ windows-2019 ]
php: [ 5.5, 5.6, 7.1, 7.2, 7.3 ]
php: [ 5.5, 5.6, 7.1, 7.2, 7.3, 7.4 ]
steps:
- name: Checkout
uses: actions/checkout@master
Expand All @@ -105,6 +141,17 @@ jobs:
with:
php-version: ${{ matrix.php }}

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**\composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install to Composer
run: composer install --no-interaction -o

Expand All @@ -120,7 +167,6 @@ jobs:
choco install -y mysql --version 5.7.18
mysql --user=root -e "CREATE DATABASE `myapp_test`;"
mysql --user=root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';FLUSH PRIVILEGES;"
mysql --user=root --password=password -h 127.0.0.1 -e "SELECT version();"
- name: Setup to EC-CUBE
env:
Expand All @@ -136,7 +182,124 @@ jobs:
shell: bash

- name: Run to PHPUnit
run: data/vendor/bin/phpunit --exclude-group classloader
run: |
data/vendor/bin/phpunit --exclude-group classloader
data/vendor/bin/phpunit --group classloader
sed 's|http://|https://|g' -i.bak data/config/config.php
data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php
install-to-linux:
name: Install to Linux
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-18.04 ]
php: [ 5.4, 5.5, 5.6, 7.1, 7.2, 7.3 ]
db: [ mysql, pgsql ]
include:
- db: mysql
dbport: '3306'
dbuser: 'root'
dbpass: 'root'
- db: pgsql
dbport: '5432'
dbuser: 'postgres'
dbpass: 'password'
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mailcatcher:
image: schickling/mailcatcher
ports:
- 1080:1080
- 1025:1025
steps:
- name: Checkout
uses: actions/checkout@master

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Install to Composer
run: composer install --no-interaction -o

- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master
with:
chromedriver-version: '77.0.3865.40'

- name: Run chromedriver
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
echo ">>> Started chrome-driver"
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
- name: CREATE mysql DATABASE
if: matrix.db == 'mysql'
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: myapp_test
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
run: mysql --user=${DBUSER} --password=${DBPASS} -h ${DBSERVER} -P ${DBPORT} -e "CREATE DATABASE ${DBNAME} DEFAULT COLLATE=utf8_general_ci;"

- name: CREATE pgsql DATABASE
if: matrix.db == 'pgsql'
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: myapp_test
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
run: |
sudo apt-fast install -y postgresql-client
export PGPASSWORD=${DBPASS}
psql -h ${DBSERVER} -U ${DBUSER} -p ${DBPORT} -c "CREATE DATABASE ${DBNAME};"
- name: Run to Codeception
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: myapp_test
DBPORT: ${{ matrix.dbport }}
DBSERVER: 127.0.0.1
HTTP_URL: http://localhost:8085/
HTTPS_URL: http://localhost:8085/
run: |
php data/vendor/bin/codecept build
php -S 0.0.0.0:8085 -t html/ &
php data/vendor/bin/codecept run --env chrome --group installer --steps acceptance InstallerCept
deploy:
name: Deploy
runs-on: ubuntu-18.04
Expand All @@ -146,6 +309,19 @@ jobs:
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'prereleased' )
uses: actions/checkout@master

- name: Get Composer Cache Directory
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'prereleased' )
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'prereleased' )
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install to Composer
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'prereleased' )
run: composer install --no-scripts --no-dev --no-interaction --optimize-autoloader
Expand Down Expand Up @@ -187,6 +363,7 @@ jobs:
rm -rf $GITHUB_WORKSPACE/.git
rm -rf $GITHUB_WORKSPACE/.gitignore
rm -rf $GITHUB_WORKSPACE/.github
rm -rf $GITHUB_WORKSPACE/.editorconfig
rm -rf $GITHUB_WORKSPACE/.travis.yml
rm -rf $GITHUB_WORKSPACE/appveyor.yml
rm -rf $GITHUB_WORKSPACE/.coveralls.yml
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
!.gitmodule
composer.phar
/data/vendor/
/node_modules/
*.cache
*.log
*.log.*
*.tpl.php
/data/config/config.php
/data/cache/*
/data/Smarty/templates_c/*
Expand All @@ -17,6 +20,7 @@ composer.phar
!/html/template/install
/phpunit.xml
/tests/tmp/*
/ctests/_output/*
/reports/*
.idea
vagrant
Expand Down
Loading

0 comments on commit 8733bfd

Please sign in to comment.