Skip to content

Commit

Permalink
Merge pull request #6073 from chihiro-adachi/dev/symfony6
Browse files Browse the repository at this point in the history
Symfony6対応
  • Loading branch information
ji-eunsoo committed Feb 26, 2024
2 parents 647bc49 + 5a67424 commit 8e96ee9
Show file tree
Hide file tree
Showing 543 changed files with 13,033 additions and 7,385 deletions.
48 changes: 28 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 8.1 ]
php: [ 8.3 ]
db: [ pgsql ]
include:
- db: pgsql
Expand All @@ -44,10 +44,10 @@ jobs:
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Setup pcov
run: |
sudo apt-fast install -y php8.1-pcov
sudo apt-fast install -y php8.3-pcov
sudo phpenmod -s cli pcov
- name: Initialize Composer
Expand All @@ -70,7 +70,10 @@ jobs:
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_URL: 'smtp://127.0.0.1:1025'
continue-on-error: true
run: php -dpcov.enabled=1 vendor/bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml
run: |
echo "session.save_path=$PWD/var/sessions/test" > php.ini
echo "memory_limit=512M" >> php.ini
php -c php.ini -dpcov.enabled=1 vendor/bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml
- name: Upload report
if: success()
uses: actions/upload-artifact@v2
Expand All @@ -83,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 8.1 ]
php: [ 8.3 ]
db: [ pgsql ]
group: [ admin01, admin02, admin03, front, installer ]
include:
Expand Down Expand Up @@ -134,12 +137,23 @@ jobs:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
TRUSTED_HOSTS: '127.0.0.1,localhost'
run: |
echo "APP_ENV=${APP_ENV}" > .env
echo "DATABASE_URL=${DATABASE_URL}" >> .env
echo "DATABASE_SERVER_VERSION=${DATABASE_SERVER_VERSION}" >> .env
echo "MAILER_DSN=${MAILER_DSN}" >> .env
echo "ECCUBE_PACKAGE_API_URL=${ECCUBE_PACKAGE_API_URL}" >> .env
echo "TRUSTED_HOSTS=${TRUSTED_HOSTS}" >> .env
bin/console doctrine:database:create --env=dev
bin/console doctrine:schema:create --env=dev
bin/console eccube:fixtures:load --env=dev
- name: Install fonts
run: sudo apt install fonts-ipafont fonts-ipaexfont

- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master

Expand All @@ -155,11 +169,14 @@ jobs:
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
cp codeception/_data/plugins/*-1.0.0.tgz repos
for d in $(ls codeception/_data/plugins | grep 1.0.0)
do
(cd codeception/_data/plugins/$d; tar zcf ../../../../repos/${d}.tgz *)
done
- name: Setup pcov
run: |
sudo apt-fast install -y php8.1-pcov
sudo apt-fast install -y php8.3-pcov
sudo phpenmod -s cli pcov
- name: Setup codeception
Expand All @@ -169,25 +186,16 @@ jobs:
sed -i "7a include __DIR__.'/c3.php';" index.php
- name: Start PHP Development Server
env:
APP_ENV: 'codeception'
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
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 &
run: php -S 127.0.0.1:8000 codeception/router.php &

- name: Codeception
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_URL: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
continue-on-error: true
run: php -dpcov.enabled=1 vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group excludeCoverage --coverage --coverage-xml
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
php -dpcov.enabled=1 vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group excludeCoverage --coverage --coverage-xml
- name: Upload outputs
uses: actions/upload-artifact@v2
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/deny-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: '7.4'
php-version: '8.1'

- name: Initialize Composer
uses: ./.github/actions/composer
Expand All @@ -59,15 +59,15 @@ jobs:
DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db
DATABASE_SERVER_VERSION: 14
run: |
bin/console eccube:composer:require "ec-cube/recommend42"
bin/console eccube:composer:require "ec-cube/coupon42"
bin/console eccube:composer:require "ec-cube/mailmagazine42"
bin/console eccube:composer:require "ec-cube/salesreport42"
bin/console eccube:composer:require "ec-cube/relatedproduct42"
bin/console eccube:composer:require "ec-cube/securitychecker42"
bin/console eccube:composer:require "ec-cube/productreview42"
bin/console eccube:composer:require "ec-cube/api42"
bin/console eccube:composer:require "ec-cube/sitekit42"
# bin/console eccube:composer:require "ec-cube/recommend42"
# bin/console eccube:composer:require "ec-cube/coupon42"
# bin/console eccube:composer:require "ec-cube/mailmagazine42"
# bin/console eccube:composer:require "ec-cube/salesreport42"
# bin/console eccube:composer:require "ec-cube/relatedproduct42"
# bin/console eccube:composer:require "ec-cube/securitychecker42"
# bin/console eccube:composer:require "ec-cube/productreview42"
# bin/console eccube:composer:require "ec-cube/api42"
# bin/console eccube:composer:require "ec-cube/sitekit42"
- name: Pre Install Plugins
env:
Expand All @@ -93,7 +93,7 @@ jobs:
docker cp ../eccube.tar.gz eccube:/tmp/
docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html"
docker exec -u www-data eccube bin/console eccube:install -n
docker exec -u www-data eccube bash -c 'for code in Api42 Coupon42 MailMagazine42 ProductReview42 Recommend42 RelatedProduct42 SalesReport42 Securitychecker42 SiteKit42; do bin/console eccube:plugin:enable --code $code; done'
# docker exec -u www-data eccube bash -c 'for code in Api42 Coupon42 MailMagazine42 ProductReview42 Recommend42 RelatedProduct42 SalesReport42 Securitychecker42 SiteKit42; do bin/console eccube:plugin:enable --code $code; done'
- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: '7.4'
php-version: '8.1'

- name: Install to Composer
run: composer install --no-scripts --no-dev --no-interaction --optimize-autoloader
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
bin/console eccube:composer:require "ec-cube/sitekit42"
- name: revert to config platform.php
run: composer config platform.php 7.4.0
run: composer config platform.php 8.1.0

- name: Pre Install Plugins
env:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-22.04 ]
php: [ '7.4', '8.0', '8.1' ]
php: [ '8.1', '8.2', '8.3' ]
db: [ pgsql ]
group: [ admin01 ]
include:
Expand All @@ -29,12 +29,13 @@ jobs:
database_server_version: 14
- group: admin01
app_env: 'codeception'
- php: '7.4'
tag: '7.4-apache'
- php: '8.0'
tag: '8.0-apache'
- php: '8.1'
tag: '8.1-apache'
- php: '8.2'
tag: '8.2-apache'
- php: '8.3'
tag: '8.3-apache'

steps:
- name: downcase REPO
run: |
Expand Down Expand Up @@ -94,6 +95,7 @@ jobs:
run: |
docker compose -f docker-compose.yml -f docker-compose.pgsql.yml up -d --wait
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
sed -i 's!APP_DEBUG: 1!APP_DEBUG: 0!g' docker-compose.yml
docker compose -f docker-compose.yml -f docker-compose.pgsql.yml up -d --wait
- name: setup-chromedriver
Expand All @@ -117,7 +119,8 @@ jobs:
SYMFONY_DEPRECATIONS_HELPER: weak
run: |
echo "APP_ENV=${APP_ENV}" > .env
vendor/bin/codecept -vvv run acceptance --env chrome,github_action_docker -g ${GROUP}
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action_docker.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action_docker -g ${GROUP} --html report.html
## see https://docs.github.com/ja/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#publishing-a-package-using-an-action

- name: Push Docker image
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/e2e-test-throttling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master

- name: Install fonts
run: sudo apt install fonts-ipafont fonts-ipaexfont

- name: Run chromedriver
run: |
export DISPLAY=:99
Expand All @@ -138,7 +141,9 @@ jobs:
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
METHOD: ${{ matrix.method }}
SYMFONY_DEPRECATIONS_HELPER: weak
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action EF09ThrottlingCest::${METHOD} --html report.html
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action EF09ThrottlingCest::${METHOD} --html report.html
- name: Upload evidence
if: failure()
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 7.4 ]
php: [ 8.1 ]
db: [ pgsql ]
group: [ 'admin01', 'admin02', 'admin03', 'front', 'restrict-fileupload', 'installer' ]
include:
Expand Down Expand Up @@ -97,7 +97,10 @@ jobs:
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
cp codeception/_data/plugins/*-1.0.0.tgz repos
for d in $(ls codeception/_data/plugins | grep 1.0.0)
do
(cd codeception/_data/plugins/$d; tar zcf ../../../../repos/${d}.tgz *)
done
- name: Start PHP Development Server
if: ${{ matrix.group != 'restrict-fileupload' }}
Expand Down Expand Up @@ -130,7 +133,9 @@ jobs:
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group restrict-file-upload --html report.html
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group restrict-file-upload --html report.html
- name: Codeception with Restrict file upload
if: ${{ matrix.group == 'restrict-fileupload' }}
Expand All @@ -143,7 +148,9 @@ jobs:
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
ECCUBE_RESTRICT_FILE_UPLOAD: '1'
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --html report.html
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --html report.html
- name: Upload evidence
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: '7.4'
php-version: '8.1'

- name: Initialize Composer
uses: ./.github/actions/composer
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/plugin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-22.04 ]
php: [ '7.4', '8.0', '8.1' ]
php: [ '8.1' ]
db: [ pgsql, mysql ]
method:
- test_install_enable_disable_remove_store
Expand Down Expand Up @@ -137,7 +137,9 @@ jobs:
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}
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD}
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
Expand All @@ -158,7 +160,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-22.04 ]
php: [ '7.4', '8.0', '8.1' ]
php: [ '8.1' ]
db: [ pgsql, mysql ]
method:
- test_install_update_remove_store
Expand Down Expand Up @@ -284,7 +286,9 @@ jobs:
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}
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD}
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
Expand All @@ -305,7 +309,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-22.04 ]
php: [ '7.4', '8.0', '8.1' ]
php: [ '8.1' ]
db: [ pgsql, mysql ]
method:
- test_extend_same_table_store
Expand Down Expand Up @@ -431,7 +435,9 @@ jobs:
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}
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD}
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
Expand All @@ -452,7 +458,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-22.04 ]
php: [ '7.4', '8.0', '8.1' ]
php: [ '8.1' ]
db: [ pgsql, mysql ]
method:
- test_dependency_each_install_plugin
Expand Down Expand Up @@ -581,7 +587,9 @@ jobs:
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}
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action EA10PluginCest:${METHOD}
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
Expand Down
Loading

0 comments on commit 8e96ee9

Please sign in to comment.