Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ jobs:
contents: "read"
outputs:
has-e2e-tests: "${{ steps.detect.outputs.has-e2e-tests }}"
glpi-branch: "${{ steps.detect.outputs.glpi-branch }}"
steps:
- name: "Checkout plugin"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
Expand All @@ -620,6 +621,17 @@ jobs:
exit 0
fi
GLPI_BRANCH="${GLPI_VERSION%.x}/bugfixes"
# Unreleased major versions have no bugfixes branch yet and are developed on `main`.
LS_REMOTE_STATUS=0
git ls-remote --exit-code --heads "https://github.com/glpi-project/glpi.git" "refs/heads/${GLPI_BRANCH}" > /dev/null || LS_REMOTE_STATUS=$?
if [[ "$LS_REMOTE_STATUS" == "2" ]]; then
echo "ℹ️ GLPI branch \"${GLPI_BRANCH}\" does not exist, falling back to \"main\"."
GLPI_BRANCH="main"
Comment on lines +627 to +629

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linked oauthsso run never reaches this branch: it has no tests/e2e, so Playwright is skipped there. Could you share a 13.0.x run from a plugin that ships E2E specs (advancedforms, gantt, unread...)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif [[ "$LS_REMOTE_STATUS" != "0" ]]; then
echo "::error::Could not determine whether GLPI branch \"${GLPI_BRANCH}\" exists."
exit 1
fi
echo "glpi-branch=${GLPI_BRANCH}" >> "$GITHUB_OUTPUT"
HTTP_CODE="$(curl -sS -o /dev/null -w '%{http_code}' "https://raw.githubusercontent.com/glpi-project/glpi/${GLPI_BRANCH}/playwright.config.ts" || true)"
if [[ "$HTTP_CODE" == "404" ]]; then
echo "has-e2e-tests=false" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -656,17 +668,13 @@ jobs:
UPDATE_FILES_ACL: true
steps:
- name: "Set env"
env:
GLPI_VERSION: "${{ inputs.glpi-version }}"
run: |
echo "APP_CONTAINER_HOME=${RUNNER_TEMP}/app_home" >> "$GITHUB_ENV"
# `glpi-version` is "X.Y.x"; the matching core branch is "X.Y/bugfixes".
echo "GLPI_BRANCH=${GLPI_VERSION%.x}/bugfixes" >> "$GITHUB_ENV"
- name: "Checkout GLPI core"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
repository: "glpi-project/glpi"
ref: "${{ env.GLPI_BRANCH }}"
ref: "${{ needs.detect-e2e-tests.outputs.glpi-branch }}"
# Checkout into the workspace root.
path: "."
persist-credentials: false
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/generate-ci-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ jobs:
{"php-version": "8.5", "db-image": "mysql:8.0"},
{"php-version": "8.5", "db-image": "mysql:9.7"}
]
},
"13.0.x": {
"minimal": [
{"php-version": "8.3", "db-image": "mysql:8.0"},
{"php-version": "8.5", "db-image": "mariadb:10.11"}
],
"complete": [
{"php-version": "8.3", "db-image": "mariadb:10.11"},
{"php-version": "8.4", "db-image": "mariadb:12.3"},
{"php-version": "8.5", "db-image": "mysql:8.0"},
{"php-version": "8.5", "db-image": "mysql:9.7"}
]
}
}
EOF
Expand Down