From 8a72751a1414d74d79287afc10d69f7910748ffc Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Sun, 4 Oct 2026 00:36:22 +0200 Subject: [PATCH] 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 --- .gitea/workflows/plugin-checks.yml | 11 +++++++---- .gitea/workflows/release.yml | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/plugin-checks.yml b/.gitea/workflows/plugin-checks.yml index 2f75c74..e437554 100644 --- a/.gitea/workflows/plugin-checks.yml +++ b/.gitea/workflows/plugin-checks.yml @@ -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" diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 855327c..3a91d7e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -12,6 +12,11 @@ permissions: contents: 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: release: runs-on: ubuntu-latest