ci: single Shopware install into shopware_test; serialize releases
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:
1 parent
233f3eb17f
commit
8a72751a14
2 files changed
+12
-4
No files matched your search
@@ -86,12 +86,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MARIADB_ROOT_PASSWORD: root
|
MARIADB_ROOT_PASSWORD: root
|
||||||
env:
|
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_ENV: test
|
||||||
APP_URL: http://localhost
|
APP_URL: http://localhost
|
||||||
APP_SECRET: ci-secret-not-for-production
|
APP_SECRET: ci-secret-not-for-production
|
||||||
INSTANCE_ID: ci
|
INSTANCE_ID: ci
|
||||||
FORCE_INSTALL: '1' # TestBootstrapper then always installs its own test DB (no separate system:install)
|
|
||||||
COMPOSER_MEMORY_LIMIT: '-1'
|
COMPOSER_MEMORY_LIMIT: '-1'
|
||||||
COMPOSER_ALLOW_SUPERUSER: '1'
|
COMPOSER_ALLOW_SUPERUSER: '1'
|
||||||
steps:
|
steps:
|
||||||
@@ -138,8 +138,11 @@ jobs:
|
|||||||
echo "PLUGIN_NAME=${PLUGIN_NAME}" >> "$GITHUB_ENV"
|
echo "PLUGIN_NAME=${PLUGIN_NAME}" >> "$GITHUB_ENV"
|
||||||
rm -rf "shopware/custom/plugins/${PLUGIN_NAME}"
|
rm -rf "shopware/custom/plugins/${PLUGIN_NAME}"
|
||||||
cp -r plugin-src "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
|
# One install into shopware_test; the bootstrapper sees an installed DB, skips its own install and
|
||||||
# installs the plugin (tests/TestBootstrap.php), so doing it here ran every migration twice.
|
# 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
|
- name: Run phpunit
|
||||||
working-directory: shopware
|
working-directory: shopware
|
||||||
run: vendor/bin/phpunit -c "custom/plugins/${PLUGIN_NAME}/phpunit.xml"
|
run: vendor/bin/phpunit -c "custom/plugins/${PLUGIN_NAME}/phpunit.xml"
|
||||||
@@ -12,6 +12,11 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
# Never run two releases at once; a second push waits instead of racing on the tag.
|
||||||
|
concurrency:
|
||||||
|
group: release
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in new issue
Block a user