From 1ec194b4640114dd42456c7ed9d229f0faaaf62a Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Sun, 4 Oct 2026 00:03:12 +0200 Subject: [PATCH] ci: PHP via apt in a bookworm container, retry shopware-cli download setup-php hangs on the runner even with runner=self-hosted; the CLI download returned a non-gzip body once under concurrent load. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/plugin-checks.yml | 22 +++++++++++++--------- .gitea/workflows/release.yml | 3 ++- docs/spec/shopware-guideline-compliance.md | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/plugin-checks.yml b/.gitea/workflows/plugin-checks.yml index 243abec..20a431d 100644 --- a/.gitea/workflows/plugin-checks.yml +++ b/.gitea/workflows/plugin-checks.yml @@ -20,7 +20,8 @@ jobs: node-version: '20' - name: Install shopware-cli run: | - curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli + curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz + tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli - name: Validate extension run: shopware-cli extension validate . @@ -36,7 +37,8 @@ jobs: node-version: '20' - name: Install shopware-cli run: | - curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli + curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz + tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli - name: Package extension run: shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA" @@ -55,6 +57,9 @@ jobs: phpunit: runs-on: ubuntu-latest + # shivammathur/setup-php hangs on this runner, so PHP comes from Debian bookworm (8.2) via apt. + container: + image: node:20-bookworm services: database: image: mariadb:11.4 @@ -64,17 +69,16 @@ jobs: DATABASE_URL: mysql://root:root@database:3306/shopware APP_ENV: test APP_URL: http://localhost + COMPOSER_MEMORY_LIMIT: '-1' + COMPOSER_ALLOW_SUPERUSER: '1' steps: - uses: actions/checkout@v4 with: path: plugin-src - - uses: shivammathur/setup-php@v2 - env: - runner: self-hosted # non-GitHub runner (act): without this setup-php hangs - with: - php-version: '8.3' - extensions: gd, intl, pdo_mysql, zip, curl, mbstring, dom, xml, fileinfo, sodium, bcmath - tools: composer + - name: Install PHP and tools + run: | + apt-get update -q + apt-get install -y -q --no-install-recommends php-cli php-gd php-intl php-mysql php-zip php-curl php-mbstring php-xml php-bcmath composer unzip jq git ca-certificates - name: Wait for the database run: | for i in $(seq 60); do diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5750cf7..6ddafb8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -50,7 +50,8 @@ jobs: - name: Install shopware-cli if: steps.meta.outputs.skip == 'false' run: | - curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli + curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz + tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli - name: Validate extension diff --git a/docs/spec/shopware-guideline-compliance.md b/docs/spec/shopware-guideline-compliance.md index 56e56aa..0e731c2 100644 --- a/docs/spec/shopware-guideline-compliance.md +++ b/docs/spec/shopware-guideline-compliance.md @@ -38,7 +38,7 @@ Jobs (all required checks on `main`): 1. `validate` - install `shopware-cli`, `extension validate .` (hard gate, no `|| true`). 2. `package` - `extension package` with `--git-commit "$GITHUB_SHA"`, then assert the zip contains built admin JS (`Resources/public/administration/js`) when an admin entry exists. -3. `phpunit` - `composer create-project shopware/production` (6.6.x) + MariaDB service, copy the plugin into `custom/plugins`, install/activate, run phpunit. PHP 8.3. +3. `phpunit` - `composer create-project shopware/production` (6.6.x) + MariaDB service, copy the plugin into `custom/plugins`, install/activate, run phpunit. PHP from the Debian bookworm container (8.2), because `shivammathur/setup-php` hangs on this runner. ### Release workflow (`.gitea/workflows/release.yml`)