ci: single Shopware install into shopware_test; serialize releases
plugin-checks / version-changelog (pull_request) Successful in 16s
plugin-checks / package (pull_request) Successful in 1m1s
plugin-checks / phpunit (pull_request) Successful in 6m2s

DATABASE_URL already ends in _test so the TestBootstrapper finds an installed DB and
skips its own migration run; FORCE_INSTALL (which failed with an unknown database) removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
haylanandClaude Bot committed 2026-10-04 00:36:22 +02:00
1 parent 233f3eb17f
commit 8a72751a14
2 files changed
+12 -4

No files matched your search

+7 -4
View File
@@ -86,12 +86,12 @@ jobs:
env:
MARIADB_ROOT_PASSWORD: root
env:
DATABASE_URL: mysql://root:root@database:3306/shopware
# Already the *_test name: Shopware's TestBootstrapper would otherwise append _test and run every migration a second time.
DATABASE_URL: mysql://root:root@database:3306/shopware_test
APP_ENV: test
APP_URL: http://localhost
APP_SECRET: ci-secret-not-for-production
INSTANCE_ID: ci
FORCE_INSTALL: '1' # TestBootstrapper then always installs its own test DB (no separate system:install)
COMPOSER_MEMORY_LIMIT: '-1'
COMPOSER_ALLOW_SUPERUSER: '1'
steps:
@@ -138,8 +138,11 @@ jobs:
echo "PLUGIN_NAME=${PLUGIN_NAME}" >> "$GITHUB_ENV"
rm -rf "shopware/custom/plugins/${PLUGIN_NAME}"
cp -r plugin-src "shopware/custom/plugins/${PLUGIN_NAME}"
# No system:install / plugin:install: Shopware's TestBootstrapper builds its own test database and
# installs the plugin (tests/TestBootstrap.php), so doing it here ran every migration twice.
# One install into shopware_test; the bootstrapper sees an installed DB, skips its own install and
# only activates the plugin (tests/TestBootstrap.php forces plugin installation).
- name: Install Shopware (once)
working-directory: shopware
run: bin/console system:install --basic-setup --create-database --force --no-interaction
- name: Run phpunit
working-directory: shopware
run: vendor/bin/phpunit -c "custom/plugins/${PLUGIN_NAME}/phpunit.xml"