Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b558a8b
use Eccube-Upgrade-Fixer
nobuhiko Jun 17, 2022
ba811a1
fixed PHP Fatal error: Declaration of Plugin\DataMigration4\Tests\We…
nobuhiko Jun 17, 2022
6949806
show databases
nobuhiko Jun 17, 2022
1081090
fix
nobuhiko Jun 17, 2022
857b4af
composer compile をやめる
nobuhiko Jun 17, 2022
9eca20c
add DATABASE_CHARSET
nobuhiko Jun 17, 2022
cde2620
miss[C
nobuhiko Jun 17, 2022
d66966d
?
nobuhiko Jun 17, 2022
438cb15
引数が変わったぽい
nobuhiko Jun 17, 2022
68f548b
TypeError: Plugin\DataMigration4\Controller\Admin\ConfigController::i…
nobuhiko Jun 17, 2022
b450230
302が返ってくる
nobuhiko Jun 17, 2022
da7d618
fetchColumn -> fetchOne
nobuhiko Jun 17, 2022
eca3595
var_dump
nobuhiko Jun 17, 2022
05c07f2
@see https://github.com/EC-CUBE/ProductReview-plugin/blob/30c06be8a91…
nobuhiko Jun 17, 2022
a3ed1ef
dist
nobuhiko Jun 17, 2022
4c1a98d
delete phpunit.xml.dist
nobuhiko Jun 17, 2022
c1e3a86
eccube/mock-package-api を使用するよう修正
nanasess Jul 13, 2022
8fccd4f
v40/v41>v42取込み用の改修
kentanakayrglm Jul 27, 2022
36a2930
Merge pull request #99 from nanasess/eccube4.2
chihiro-adachi Aug 5, 2022
f383207
Merge remote-tracking branch 'origin/master' into eccube4.2
chihiro-adachi Aug 5, 2022
e7003f9
v40/v41>v42取込み用の改修
kentanakayrglm Jul 27, 2022
2eedaf3
マージミスを解消
chihiro-adachi Aug 5, 2022
e5aee36
マージミスを解消
chihiro-adachi Aug 5, 2022
111626a
Merge branch 'support4041' of https://github.com/KenTanaka/data-migra…
kentanakayrglm Aug 8, 2022
4bc2465
・3系/4系評価順の修正
kentanakayrglm Aug 8, 2022
cb639ba
・ポスト先の修正(42対応)
kentanakayrglm Aug 9, 2022
8bd2059
・ユニットテストデータの追加(4.0/4.1)
kentanakayrglm Aug 9, 2022
336ef27
composer update
chihiro-adachi Aug 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PHPStan
on: [workflow_dispatch, pull_request]
env:
PLUGIN_NAME: DataMigration4
PLUGIN_NAME: DataMigration42
DATABASE_URL: mysql://root:root@127.0.0.1:3306/eccube_db
DATABASE_SERVER_VERSION: 5

Expand Down
189 changes: 118 additions & 71 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,118 +1,165 @@
# @see https://github.com/kurozumi
name: CI/CD for EC-CUBE4 Plugin
on: [workflow_dispatch, pull_request]
env:
PLUGIN_NAME: DataMigration4
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
run-on-linux:
name: Run on Linux
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
eccube-versions: ['4.0','4.1']
php-versions: [7.1,7.2,7.3,7.4]
database: [mysql, pgsql]
operating-system: [ ubuntu-18.04 ]
php: [ '7.4', '8.0', '8.1' ]
db: [ 'mysql', 'mysql8', 'pgsql' ]
eccube_version: [ '4.2' ]
plugin_code: [ 'DataMigration42' ]
include:
- database: mysql
database_url: mysql://root:root@127.0.0.1:3306/eccube_db
database_server_version: 5
- database: pgsql
- db: mysql
database_url: mysql://root:password@127.0.0.1:3306/eccube_db
database_server_version: 5.7
database_charset: utf8mb4
- db: mysql8
database_url: mysql://root:password@127.0.0.1:3308/eccube_db
database_server_version: 8
database_charset: utf8mb4
- db: pgsql
database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db
database_server_version: 11

database_server_version: 14
database_charset: utf8
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: eccube_db
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ${{ matrix.dbname }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
mysql8:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ${{ matrix.dbname }}
ports:
- 3308:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:11
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: eccube_db
POSTGRES_DB: ${{ matrix.dbname }}
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 EC-CUBE
- run: sudo apt-get purge -y hhvm
- name: Checkout
uses: actions/checkout@v2
with:
repository: EC-CUBE/ec-cube
ref: ${{ matrix.eccube-versions }}

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, mysql, intl, zip, pgsql
tools: composer:v2
php-version: ${{ matrix.php }}

- if: matrix.eccube-versions == '4.0'
run: sudo composer selfupdate --1
- name: Archive Plugin
env:
PLUGIN_CODE: ${{ matrix.plugin_code }}
run: |
tar cvzf ${GITHUB_WORKSPACE}/${PLUGIN_CODE}.tar.gz ./*

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup mock-package-api
env:
PLUGIN_CODE: ${{ matrix.plugin_code }}
run: |
mkdir -p /tmp/repos
cp ${GITHUB_WORKSPACE}/${PLUGIN_CODE}.tar.gz /tmp/repos/${PLUGIN_CODE}.tgz
docker run --name package-api -d -v /tmp/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2

- name: Cache composer dependencies
uses: actions/cache@v2
- name: Checkout EC-CUBE
uses: actions/checkout@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
repository: 'EC-CUBE/ec-cube'
ref: ${{ matrix.eccube_version }}
path: 'ec-cube'

- name: Install Composer dependencies
run : |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
composer require pear/pear-core-minimal:^1.10.10 pear/archive_tar:^1.4.13 wapmorgan/unified-archive:^1.1.1 nobuhiko/bulk-insert-query

- name: Install Composer eccube4-test-fixer
if: matrix.eccube-versions == '4.0'
run : |
composer require --dev kiy0taka/eccube4-test-fixer

- name: Checkout
uses: actions/checkout@v2
- 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: app/Plugin/DataMigration4
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install to composer
working-directory: 'ec-cube'
run: composer install --no-interaction -o --apcu-autoloader

- name: Setup EC-CUBE and Plugin
- name: Setup EC-CUBE
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
working-directory: 'ec-cube'
run: |
bin/console doctrine:database:create
bin/console doctrine:schema:create
bin/console eccube:fixtures:load
- name: Setup Plugin
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
USE_SELFSIGNED_SSL_CERTIFICATE: '1'
working-directory: 'ec-cube'
run: |
composer compile
bin/console eccube:plugin:install --code $PLUGIN_NAME
bin/console doctrine:query:sql "update dtb_base_info set authentication_key='dummy'"
bin/console eccube:composer:require ec-cube/datamigration42
bin/console cache:clear --no-warmup
bin/console eccube:plugin:enable --code $PLUGIN_NAME
bin/console eccube:plugin:enable --code=${PLUGIN_CODE}
- name: Run PHPUnit
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}

- name: Run Tests for EC-CUBE4.0
if: matrix.eccube-versions == '4.0'
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
working-directory: 'ec-cube'
run: |
find app/Plugin/$PLUGIN_NAME/Tests -name "*Test.php" | while read TESTCASE
do
bin/phpunit --include-path vendor/kiy0taka/eccube4-test-fixer/src --loader 'Eccube\PHPUnit\Loader\Eccube4CompatTestSuiteLoader' ${TESTCASE}
done
rm -rf var/cache
bin/phpunit app/Plugin/${PLUGIN_CODE}/Tests
- name: Disable Plugin
working-directory: 'ec-cube'
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
run: bin/console eccube:plugin:disable --code=${PLUGIN_CODE}

- name: Run Tests for EC-CUBE4.1
if: matrix.eccube-versions != '4.0'
run: |
bin/phpunit app/Plugin/$PLUGIN_NAME/Tests
- name: Uninstall Plugin
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
working-directory: 'ec-cube'
run: bin/console eccube:plugin:uninstall --code=${PLUGIN_CODE}
Loading