diff --git a/.github/scripts/00-localsetup.sh b/.github/scripts/00-localsetup.sh index 3dc064d..7dec130 100755 --- a/.github/scripts/00-localsetup.sh +++ b/.github/scripts/00-localsetup.sh @@ -3,7 +3,7 @@ # 00-localsetup.sh — Local orchestrator for the Pimcore API test environment # # Usage: -# ./.github/scripts/00-localsetup.sh --token= [--platform-version=2026.3] +# ./.github/scripts/00-localsetup.sh --token= [--platform-version=2026.3.x] # # First-time flow (no credentials yet): # 1. Run: ./.github/scripts/00-localsetup.sh --token= @@ -24,7 +24,7 @@ source "${FILES_DIR}/.env" [[ -f "$ENV_LOCAL" ]] && source "$ENV_LOCAL" TOKEN="${COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN:-}" -PLATFORM_VERSION="${PLATFORM_VERSION:-2026.3}" +PLATFORM_VERSION="${PLATFORM_VERSION:-2026.3.x}" # ─── Parse arguments ───────────────────────────────────────────────────────── for arg in "$@"; do @@ -36,8 +36,8 @@ for arg in "$@"; do echo "" echo "Options:" echo " --token=TOKEN Enterprise packagist token (required)" - echo " --platform-version=VER Platform/skeleton version to install (default: 2026.3)" - echo " Examples: 2026.3 (stable), 2026.x (dev branch)" + echo " --platform-version=VER Platform/skeleton version to install (default: 2026.3.x)" + echo " Examples: 2026.3.x (release branch), 2026.x (dev branch)" echo "" echo "Other scripts:" echo " 05-reset.sh Fast DB reset — re-runs installer without composer steps" diff --git a/.github/scripts/01-setup-environment.sh b/.github/scripts/01-setup-environment.sh index 94d5e58..5709a7e 100755 --- a/.github/scripts/01-setup-environment.sh +++ b/.github/scripts/01-setup-environment.sh @@ -6,13 +6,13 @@ # ./01-setup-environment.sh [--ci] # # TOKEN Enterprise packagist token -# PLATFORM_VERSION e.g. 2026.3 (stable) or 2026.x (dev branch) +# PLATFORM_VERSION e.g. 2026.3.x (release branch) or 2026.x (dev branch) # --ci CI mode: use github-actions repo URL # set -euo pipefail TOKEN="${1:-}" -PLATFORM_VERSION="${2:-2026.3}" +PLATFORM_VERSION="${2:-2026.3.x}" CI_MODE=false for arg in "$@"; do [[ "$arg" == "--ci" ]] && CI_MODE=true; done @@ -70,13 +70,22 @@ fi PROJECT_PARENT="$(dirname "$PROJECT_PATH")" PROJECT_NAME="$(basename "$PROJECT_PATH")" -docker run \ +if ! docker run \ -u "$(id -u):$(id -g)" --rm \ -v "${PROJECT_PARENT}:/var/www/html" \ -e COMPOSER_HOME=/tmp/composer \ "${PHP_IMAGE}" \ composer create-project "pimcore/skeleton:${SKELETON_CONSTRAINT}" "$PROJECT_NAME" \ --no-scripts --no-interaction +then + if [[ "$SKELETON_CONSTRAINT" == ^* ]]; then + echo "" + echo "HINT: '${PLATFORM_VERSION}' became the stable constraint '${SKELETON_CONSTRAINT}'," + echo " which only resolves once the line is tagged. Pass '${PLATFORM_VERSION}.x'" + echo " to install the release branch (${PLATFORM_VERSION}.x-dev) instead." + fi + exit 1 +fi # ─── Copy config files ──────────────────────────────────────────────────────── echo ">>> Copying configuration files..." diff --git a/.github/scripts/02-install-pimcore.sh b/.github/scripts/02-install-pimcore.sh index 42c2f41..364ee0b 100755 --- a/.github/scripts/02-install-pimcore.sh +++ b/.github/scripts/02-install-pimcore.sh @@ -6,13 +6,13 @@ # ./02-install-pimcore.sh [--ci] # # TOKEN Enterprise packagist token -# PLATFORM_VERSION e.g. 2026.3 (stable) or 2026.x (dev branch) +# PLATFORM_VERSION e.g. 2026.3.x (release branch) or 2026.x (dev branch) # --ci CI mode: use github-actions repo URL # set -euo pipefail TOKEN="${1:-}" -PLATFORM_VERSION="${2:-2026.3}" +PLATFORM_VERSION="${2:-2026.3.x}" CI_MODE=false for arg in "$@"; do [[ "$arg" == "--ci" ]] && CI_MODE=true; done diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml index 871ae14..d0be3b1 100644 --- a/.github/workflows/api-tests.yml +++ b/.github/workflows/api-tests.yml @@ -6,16 +6,21 @@ on: workflow_dispatch: inputs: branch: - description: 'Branch to test' + description: 'Branch to check out (test code)' default: '2026.x' type: choice options: - '2026.3' - '2026.x' platform_version: - description: 'Platform version (e.g. 2026.3, 2026.3.x or 2026.x)' + description: 'Platform version to install' default: '2026.x' - type: string + type: choice + # '2026.3' is added here once v2026.3.0 is tagged; `^2026.3` cannot + # resolve before that, so it must not be selectable. + options: + - '2026.3.x' + - '2026.x' env: PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} @@ -35,8 +40,11 @@ jobs: fail-fast: false matrix: # ref = git branch checked out (test code); platform = version installed - # schedule legs: 2026.3 release (^2026.3), 2026.3 dev branch (2026.3.x-dev), 2026.x dev branch (2026.x-dev) - include: ${{ github.event_name == 'schedule' && fromJSON('[{"ref":"2026.3","platform":"2026.3"},{"ref":"2026.3","platform":"2026.3.x"},{"ref":"2026.x","platform":"2026.x"}]') || fromJSON(format('[{{"ref":"{0}","platform":"{1}"}}]', inputs.branch, inputs.platform_version || inputs.branch)) }} + # schedule legs: 2026.3 dev branch (2026.3.x-dev), 2026.x dev branch (2026.x-dev) + # The 2026.3 release leg ({"ref":"2026.3","platform":"2026.3"}) is added once + # v2026.3.0 is tagged — `^2026.3` cannot resolve before that, see + # "Testing a Platform Version Before Its Release" in doc/04_API_Testing/01_API_TESTS.md. + include: ${{ github.event_name == 'schedule' && fromJSON('[{"ref":"2026.3","platform":"2026.3.x"},{"ref":"2026.x","platform":"2026.x"}]') || fromJSON(format('[{{"ref":"{0}","platform":"{1}"}}]', inputs.branch, inputs.platform_version || inputs.branch)) }} steps: - name: Checkout diff --git a/doc/04_API_Testing/01_API_TESTS.md b/doc/04_API_Testing/01_API_TESTS.md index 0598b2c..6ed835f 100644 --- a/doc/04_API_Testing/01_API_TESTS.md +++ b/doc/04_API_Testing/01_API_TESTS.md @@ -21,7 +21,7 @@ npm install ### 2. Full setup + tests ```bash -.github/scripts/00-localsetup.sh --token= --platform-version=2026.3 +.github/scripts/00-localsetup.sh --token= --platform-version=2026.3.x ``` On the first run the script pauses and prints a registration URL. Register the @@ -72,6 +72,31 @@ Admin credentials: `admin` / `admin` .github/scripts/06-teardown.sh # full shutdown ``` +## Testing a Platform Version Before Its Release + +A platform version that is branched but not yet tagged is tested through its +**release branch**, i.e. `2026.3.x` → `2026.3.x-dev`: + +```bash +gh workflow run api-tests.yml --repo pimcore/platform-version \ + --ref 2026.3 -f branch=2026.3 -f platform_version=2026.3.x +``` + +A bare `2026.3` does not work before `v2026.3.0` exists, and fails differently in +each script: + +- `01-setup-environment.sh` builds `pimcore/skeleton:^2026.3`, and + `composer create-project` runs at stability `stable` — it aborts with + *Could not find package pimcore/skeleton with version ^2026.3*. +- `02-install-pimcore.sh` runs under `minimum-stability: dev`, where `^2026.3` + *does* resolve — to `2026.x-dev`, which normalizes to `2026.9999999.9999999` + and outranks `2026.3.x-dev`. That is a green run against the wrong line. + +So `2026.3` is neither a schedule leg nor a selectable `platform_version` until the +tag exists; until then the release branch is covered by the `2026.3.x` leg. Unlike +`2026.x`, that leg does exercise the release branch's pinned `conflict` bounds +(`<2026.3 || >=2026.4`), which is what will actually ship. + ## New Platform Version Release When releasing a new platform version (e.g. `2026.3`), update the following: @@ -81,8 +106,10 @@ When releasing a new platform version (e.g. `2026.3`), update the following: appended: - `inputs.branch.options` — replace the previous stable entry (e.g. `'2026.2'`) with the new one (`'2026.3'`); `'2026.x'` stays + - `inputs.platform_version.options` — add the now-tagged `'2026.3'` - `inputs.platform_version.description` — update the examples - - `strategy.matrix.include` — the three scheduled legs are + - `strategy.matrix.include` — do this step **at tagging time, not before** + (see the section above). The three scheduled legs are `{ref: , platform: }` (installs `^2026.3`), `{ref: , platform: .x}` (installs `2026.3.x-dev` from the release branch) and `{ref: 2026.x, platform: 2026.x}` (installs `2026.x-dev`).