mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
fix(release): support frozen Matrix QA profiles (#108279)
This commit is contained in:
@@ -475,7 +475,23 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
|
||||
output_dir=".artifacts/qa-e2e/matrix-live-${INPUT_MATRIX_PROFILE}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
resolve_matrix_profile() {
|
||||
local requested="$1"
|
||||
local help_text="$2"
|
||||
if [[ "${requested}" == "release" ]] && ! grep -Fq "fast, release, transport" <<<"${help_text}"; then
|
||||
printf 'fast\n'
|
||||
return
|
||||
fi
|
||||
printf '%s\n' "${requested}"
|
||||
}
|
||||
|
||||
matrix_help="$(pnpm openclaw qa matrix --help 2>&1)"
|
||||
matrix_profile="$(resolve_matrix_profile "${INPUT_MATRIX_PROFILE}" "${matrix_help}")"
|
||||
if [[ "${matrix_profile}" != "${INPUT_MATRIX_PROFILE}" ]]; then
|
||||
echo "Selected target does not support Matrix profile '${INPUT_MATRIX_PROFILE}'; using '${matrix_profile}'."
|
||||
fi
|
||||
|
||||
output_dir=".artifacts/qa-e2e/matrix-live-${matrix_profile}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
echo "output_dir=${output_dir}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
for attempt in $(seq 1 "${MATRIX_ATTEMPTS}"); do
|
||||
@@ -486,7 +502,7 @@ jobs:
|
||||
--provider-mode "${MATRIX_PROVIDER_MODE}" \
|
||||
--model "${MATRIX_PRIMARY_MODEL}" \
|
||||
--alt-model "${MATRIX_ALTERNATE_MODEL}" \
|
||||
--profile "${INPUT_MATRIX_PROFILE}" \
|
||||
--profile "${matrix_profile}" \
|
||||
--fast; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -2387,8 +2387,26 @@ describe("package artifact reuse", () => {
|
||||
'echo "Matrix live lane failed on attempt ${attempt}; retrying..." >&2',
|
||||
);
|
||||
expect(qaWorkflow).not.toContain("OPENCLAW_QA_MATRIX_CANARY_TIMEOUT_MS");
|
||||
expect(qaWorkflow).toContain('--profile "${INPUT_MATRIX_PROFILE}"');
|
||||
expect(qaWorkflow).toContain('--profile "${matrix_profile}"');
|
||||
expect(qaWorkflow).not.toContain("--fail-fast");
|
||||
|
||||
const matrixRunScript = workflowStep(matrixJob, "Run Matrix live lane").run ?? "";
|
||||
const resolveMatrixProfile = shellFunctionSource(matrixRunScript, "resolve_matrix_profile");
|
||||
const resolveProfile = (requested: string, helpText: string) =>
|
||||
execFileSync(
|
||||
"bash",
|
||||
[
|
||||
"-c",
|
||||
`${resolveMatrixProfile}\nresolve_matrix_profile "$1" "$2"`,
|
||||
"resolve-matrix-profile",
|
||||
requested,
|
||||
helpText,
|
||||
],
|
||||
{ encoding: "utf8" },
|
||||
).trim();
|
||||
expect(resolveProfile("release", "profiles: all, fast, release, transport")).toBe("release");
|
||||
expect(resolveProfile("release", "profiles: all, fast, transport")).toBe("fast");
|
||||
expect(resolveProfile("e2ee-smoke", "profiles: all, fast, transport")).toBe("e2ee-smoke");
|
||||
});
|
||||
|
||||
it("runs live transport lanes nightly while release checks stay gated", () => {
|
||||
|
||||
Reference in New Issue
Block a user