fix:必須バッチの追加と周りの修正 #2699
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Plugin test for EC-CUBE | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
paths: | |
- '**' | |
- '!*.md' | |
pull_request: | |
paths: | |
- '**' | |
- '!*.md' | |
jobs: | |
plugin-install: | |
name: Plugin install | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-22.04 ] | |
php: [ '7.4', '8.0', '8.1' ] | |
db: [ pgsql, mysql ] | |
method: | |
- test_install_enable_disable_remove_store | |
- test_install_enable_disable_remove_local | |
- test_install_enable_disable_enable_disable_remove_store | |
- test_install_enable_disable_enable_disable_remove_local | |
- test_install_remove_local | |
- test_install_remove_store | |
- test_bundle_install_enable_disable_remove_store | |
- test_bundle_install_update_enable_disable_remove_store | |
include: | |
- db: pgsql | |
database_url: postgres://postgres:[email protected]:5432/eccube_db | |
database_server_version: 14 | |
database_charset: utf8 | |
- db: mysql | |
database_url: mysql://root:[email protected]:3306/eccube_db | |
database_server_version: 5 | |
database_charset: utf8mb4 | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
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: Setup PHP | |
uses: nanasess/setup-php@master | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Initialize Composer | |
uses: ./.github/actions/composer | |
- name: Setup to EC-CUBE | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
run: | | |
echo "APP_ENV=${APP_ENV}" > .env | |
bin/console doctrine:database:create --env=dev | |
bin/console doctrine:schema:create --env=dev | |
bin/console eccube:fixtures:load --env=dev | |
- name: Update baseinfo with pgsql | |
if: matrix.db == 'pgsql' | |
env: | |
PGPASSWORD: 'password' | |
run: | | |
sudo apt-fast install -y postgresql-client | |
psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" | |
- name: Update baseinfo with mysql | |
if: matrix.db == 'mysql' | |
run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" | |
- name: setup-chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- 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: Start PHP Development Server | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
run: php -S 127.0.0.1:8000 codeception/router.php & | |
## ${PWD}/repos does not exist so service cannot be started | |
- name: Run package-api | |
run: | | |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi | |
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 | |
- name: Codeception | |
env: | |
APP_ENV: ${{ matrix.app_env }} | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
METHOD: ${{ matrix.method }} | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
NO_FIXTURES: 1 | |
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} | |
- name: Upload evidence | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-install-${{ matrix.method }}-evidence | |
path: codeception/_output/ | |
- name: Upload logs | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-install-${{ matrix.method }}-logs | |
path: var/log/ | |
plugin-update: | |
name: Plugin Update | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-22.04 ] | |
php: [ '7.4', '8.0', '8.1' ] | |
db: [ pgsql, mysql ] | |
method: | |
- test_install_update_remove_store | |
- test_install_update_remove_local | |
- test_install_enable_disable_update_enable_disable_remove_local | |
- test_install_enable_disable_update_enable_disable_remove_store | |
- test_install_enable_update_disable_remove_store | |
- test_install_enable_update_disable_remove_local | |
include: | |
- db: pgsql | |
database_url: postgres://postgres:[email protected]:5432/eccube_db | |
database_server_version: 14 | |
database_charset: utf8 | |
- db: mysql | |
database_url: mysql://root:[email protected]:3306/eccube_db | |
database_server_version: 5 | |
database_charset: utf8mb4 | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
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 --dev --no-interaction -o --apcu-autoloader | |
- name: Setup to EC-CUBE | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
run: | | |
echo "APP_ENV=${APP_ENV}" > .env | |
bin/console doctrine:database:create --env=dev | |
bin/console doctrine:schema:create --env=dev | |
bin/console eccube:fixtures:load --env=dev | |
- name: Update baseinfo with pgsql | |
if: matrix.db == 'pgsql' | |
env: | |
PGPASSWORD: 'password' | |
run: | | |
sudo apt-fast install -y postgresql-client | |
psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" | |
- name: Update baseinfo with mysql | |
if: matrix.db == 'mysql' | |
run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" | |
- name: setup-chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- 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: Start PHP Development Server | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
run: php -S 127.0.0.1:8000 codeception/router.php & | |
## ${PWD}/repos does not exist so service cannot be started | |
- name: Run package-api | |
run: | | |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi | |
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 | |
- name: Run to Codeception | |
env: | |
APP_ENV: ${{ matrix.app_env }} | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
METHOD: ${{ matrix.method }} | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
NO_FIXTURES: 1 | |
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} | |
- name: Upload evidence | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-update-${{ matrix.method }}-evidence | |
path: codeception/_output/ | |
- name: Upload logs | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-update-${{ matrix.method }}-logs | |
path: var/log/ | |
plugin-extend: | |
name: Plugin extend | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-22.04 ] | |
php: [ '7.4', '8.0', '8.1' ] | |
db: [ pgsql, mysql ] | |
method: | |
- test_extend_same_table_store | |
- test_extend_same_table_disabled_remove_store | |
- test_extend_same_table_local | |
- test_extend_same_table_disabled_remove_local | |
- test_extend_same_table_crossed_store | |
- test_extend_same_table_crossed_local | |
include: | |
- db: pgsql | |
database_url: postgres://postgres:[email protected]:5432/eccube_db | |
database_server_version: 14 | |
database_charset: utf8 | |
- db: mysql | |
database_url: mysql://root:[email protected]:3306/eccube_db | |
database_server_version: 5 | |
database_charset: utf8mb4 | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
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 --dev --no-interaction -o --apcu-autoloader | |
- name: Setup to EC-CUBE | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
run: | | |
echo "APP_ENV=${APP_ENV}" > .env | |
bin/console doctrine:database:create --env=dev | |
bin/console doctrine:schema:create --env=dev | |
bin/console eccube:fixtures:load --env=dev | |
- name: Update baseinfo with pgsql | |
if: matrix.db == 'pgsql' | |
env: | |
PGPASSWORD: 'password' | |
run: | | |
sudo apt-fast install -y postgresql-client | |
psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" | |
- name: Update baseinfo with mysql | |
if: matrix.db == 'mysql' | |
run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" | |
- name: setup-chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- 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: Start PHP Development Server | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
run: php -S 127.0.0.1:8000 codeception/router.php & | |
## ${PWD}/repos does not exist so service cannot be started | |
- name: Run package-api | |
run: | | |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi | |
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 | |
- name: Run to Codeception | |
env: | |
APP_ENV: ${{ matrix.app_env }} | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
METHOD: ${{ matrix.method }} | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
NO_FIXTURES: 1 | |
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} | |
- name: Upload evidence | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-extend-${{ matrix.method }}-evidence | |
path: codeception/_output/ | |
- name: Upload logs | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-extend-${{ matrix.method }}-logs | |
path: var/log/ | |
plugin-depend: | |
name: Plugin depend | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-22.04 ] | |
php: [ '7.4', '8.0', '8.1' ] | |
db: [ pgsql, mysql ] | |
method: | |
- test_dependency_each_install_plugin | |
- test_dependency_plugin_install | |
- test_dependency_plugin_update | |
- test_install_error | |
- install_enable_disable_enable_disable_remove_store | |
- test_enhance_plugin_entity | |
include: | |
- db: pgsql | |
database_url: postgres://postgres:[email protected]:5432/eccube_db | |
database_server_version: 14 | |
database_charset: utf8 | |
- db: mysql | |
database_url: mysql://root:[email protected]:3306/eccube_db | |
database_server_version: 5 | |
database_charset: utf8mb4 | |
exclude: | |
- db: mysql | |
method: test_dependency_plugin_update | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
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 --dev --no-interaction -o --apcu-autoloader | |
- name: Setup to EC-CUBE | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
run: | | |
echo "APP_ENV=${APP_ENV}" > .env | |
bin/console doctrine:database:create --env=dev | |
bin/console doctrine:schema:create --env=dev | |
bin/console eccube:fixtures:load --env=dev | |
- name: Update baseinfo with pgsql | |
if: matrix.db == 'pgsql' | |
env: | |
PGPASSWORD: 'password' | |
run: | | |
sudo apt-fast install -y postgresql-client | |
psql eccube_db -h 127.0.0.1 -U postgres -c "update dtb_base_info set authentication_key='test';" | |
- name: Update baseinfo with mysql | |
if: matrix.db == 'mysql' | |
run: mysql -h 127.0.0.1 -u root -ppassword eccube_db -e "update dtb_base_info set authentication_key='test';" | |
- name: setup-chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- 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: Start PHP Development Server | |
env: | |
APP_ENV: 'codeception' | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
run: php -S 127.0.0.1:8000 codeception/router.php & | |
## ${PWD}/repos does not exist so service cannot be started | |
- name: Run package-api | |
run: | | |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi | |
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2 | |
- name: Run to Codeception | |
env: | |
APP_ENV: ${{ matrix.app_env }} | |
DATABASE_URL: ${{ matrix.database_url }} | |
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} | |
DATABASE_CHARSET: ${{ matrix.database_charset }} | |
MAILER_URL: 'smtp://127.0.0.1:1025' | |
METHOD: ${{ matrix.method }} | |
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080' | |
NO_FIXTURES: 1 | |
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD} | |
- name: Upload evidence | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-depend-${{ matrix.method }}-evidence | |
path: codeception/_output/ | |
- name: Upload logs | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: plugin-depend-${{ matrix.method }}-logs | |
path: var/log/ |