diff --git a/.github/workflows/mantis-discord-smoke.yml b/.github/workflows/mantis-discord-smoke.yml index bcb47c48282c..120091372cb7 100644 --- a/.github/workflows/mantis-discord-smoke.yml +++ b/.github/workflows/mantis-discord-smoke.yml @@ -171,4 +171,4 @@ jobs: name: mantis-discord-smoke-${{ github.run_id }}-${{ github.run_attempt }} path: .artifacts/qa-e2e/mantis/ retention-days: 14 - if-no-files-found: warn + if-no-files-found: error diff --git a/.github/workflows/mantis-discord-status-reactions.yml b/.github/workflows/mantis-discord-status-reactions.yml index f0433620c79a..f73d9e0e2c0e 100644 --- a/.github/workflows/mantis-discord-status-reactions.yml +++ b/.github/workflows/mantis-discord-status-reactions.yml @@ -540,7 +540,7 @@ jobs: name: mantis-discord-status-reactions-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ steps.run_mantis.outputs.output_dir }} retention-days: 14 - if-no-files-found: warn + if-no-files-found: error - name: Create Mantis GitHub App token id: mantis_app_token diff --git a/.github/workflows/mantis-discord-thread-attachment.yml b/.github/workflows/mantis-discord-thread-attachment.yml index 34d0fb5e4919..2386295177dc 100644 --- a/.github/workflows/mantis-discord-thread-attachment.yml +++ b/.github/workflows/mantis-discord-thread-attachment.yml @@ -547,7 +547,7 @@ jobs: with: name: mantis-discord-thread-attachment-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ steps.run_mantis.outputs.output_dir }} - if-no-files-found: warn + if-no-files-found: error retention-days: 14 - name: Create Mantis GitHub App token diff --git a/.github/workflows/mantis-slack-desktop-smoke.yml b/.github/workflows/mantis-slack-desktop-smoke.yml index 39c131e29d2b..be6af638c140 100644 --- a/.github/workflows/mantis-slack-desktop-smoke.yml +++ b/.github/workflows/mantis-slack-desktop-smoke.yml @@ -458,7 +458,7 @@ jobs: name: mantis-slack-desktop-smoke-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ steps.run_mantis.outputs.output_dir }} retention-days: 14 - if-no-files-found: warn + if-no-files-found: error - name: Create Mantis GitHub App token id: mantis_app_token diff --git a/.github/workflows/mantis-telegram-desktop-proof.yml b/.github/workflows/mantis-telegram-desktop-proof.yml index ba8b77ce993f..4108a311c5cd 100644 --- a/.github/workflows/mantis-telegram-desktop-proof.yml +++ b/.github/workflows/mantis-telegram-desktop-proof.yml @@ -556,7 +556,7 @@ jobs: name: mantis-telegram-desktop-proof-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ steps.inspect.outputs.output_dir }} retention-days: 14 - if-no-files-found: warn + if-no-files-found: error - name: Create Mantis GitHub App token id: mantis_app_token diff --git a/.github/workflows/mantis-telegram-live.yml b/.github/workflows/mantis-telegram-live.yml index 407a80a0e213..debf85f82ba1 100644 --- a/.github/workflows/mantis-telegram-live.yml +++ b/.github/workflows/mantis-telegram-live.yml @@ -506,7 +506,7 @@ jobs: name: mantis-telegram-live-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ steps.run_mantis.outputs.output_dir }} retention-days: 14 - if-no-files-found: warn + if-no-files-found: error - name: Create Mantis GitHub App token id: mantis_app_token diff --git a/.github/workflows/npm-telegram-beta-e2e.yml b/.github/workflows/npm-telegram-beta-e2e.yml index 5e3503ac8c5e..fb50e914e0dd 100644 --- a/.github/workflows/npm-telegram-beta-e2e.yml +++ b/.github/workflows/npm-telegram-beta-e2e.yml @@ -273,4 +273,4 @@ jobs: name: npm-telegram-beta-e2e-${{ github.run_id }}-${{ github.run_attempt }} path: .artifacts/qa-e2e/ retention-days: 14 - if-no-files-found: warn + if-no-files-found: error diff --git a/scripts/test-projects.test-support.mjs b/scripts/test-projects.test-support.mjs index 9bc8ed2cf936..171b0f6c6ba6 100644 --- a/scripts/test-projects.test-support.mjs +++ b/scripts/test-projects.test-support.mjs @@ -496,7 +496,26 @@ const GITHUB_WORKFLOW_OWNER_TEST_TARGETS = new Map([ [".github/workflows/macos-release.yml", ["test/scripts/package-acceptance-workflow.test.ts"]], [ ".github/workflows/mantis-telegram-desktop-proof.yml", - ["test/scripts/mantis-telegram-desktop-proof-workflow.test.ts"], + [ + "test/scripts/mantis-telegram-desktop-proof-workflow.test.ts", + "test/scripts/package-acceptance-workflow.test.ts", + ], + ], + [ + ".github/workflows/mantis-discord-smoke.yml", + ["test/scripts/package-acceptance-workflow.test.ts"], + ], + [ + ".github/workflows/mantis-discord-status-reactions.yml", + ["test/scripts/package-acceptance-workflow.test.ts"], + ], + [ + ".github/workflows/mantis-discord-thread-attachment.yml", + ["test/scripts/package-acceptance-workflow.test.ts"], + ], + [ + ".github/workflows/mantis-slack-desktop-smoke.yml", + ["test/scripts/package-acceptance-workflow.test.ts"], ], [ ".github/workflows/mantis-telegram-live.yml", diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index f1fc677f1266..289015b5d464 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -9,6 +9,15 @@ const LIVE_MEDIA_RUNNER_DOCKERFILE = ".github/images/live-media-runner/Dockerfil const LIVE_MEDIA_RUNNER_IMAGE = "ghcr.io/openclaw/openclaw-live-media-runner:ubuntu-24.04"; const LIVE_MEDIA_RUNNER_IMAGE_WORKFLOW = ".github/workflows/live-media-runner-image.yml"; const NPM_TELEGRAM_WORKFLOW = ".github/workflows/npm-telegram-beta-e2e.yml"; +const MANTIS_DISCORD_SMOKE_WORKFLOW = ".github/workflows/mantis-discord-smoke.yml"; +const MANTIS_DISCORD_STATUS_REACTIONS_WORKFLOW = + ".github/workflows/mantis-discord-status-reactions.yml"; +const MANTIS_DISCORD_THREAD_ATTACHMENT_WORKFLOW = + ".github/workflows/mantis-discord-thread-attachment.yml"; +const MANTIS_SLACK_DESKTOP_SMOKE_WORKFLOW = ".github/workflows/mantis-slack-desktop-smoke.yml"; +const MANTIS_TELEGRAM_DESKTOP_PROOF_WORKFLOW = + ".github/workflows/mantis-telegram-desktop-proof.yml"; +const MANTIS_TELEGRAM_LIVE_WORKFLOW = ".github/workflows/mantis-telegram-live.yml"; const PACKAGE_JSON = "package.json"; const SETUP_PNPM_STORE_CACHE_ACTION = ".github/actions/setup-pnpm-store-cache/action.yml"; const DOCKER_E2E_PLAN_ACTION = ".github/actions/docker-e2e-plan/action.yml"; @@ -1439,6 +1448,58 @@ describe("package artifact reuse", () => { } }); + it("requires live proof evidence artifacts when proof jobs run", () => { + const cases = [ + { + workflowPath: MANTIS_DISCORD_SMOKE_WORKFLOW, + jobName: "run_discord_smoke", + stepName: "Upload Mantis artifacts", + }, + { + workflowPath: MANTIS_DISCORD_STATUS_REACTIONS_WORKFLOW, + jobName: "run_status_reactions", + stepName: "Upload Mantis status reaction artifacts", + }, + { + workflowPath: MANTIS_DISCORD_THREAD_ATTACHMENT_WORKFLOW, + jobName: "run_thread_attachment", + stepName: "Upload Mantis thread attachment artifacts", + }, + { + workflowPath: MANTIS_SLACK_DESKTOP_SMOKE_WORKFLOW, + jobName: "run_slack_desktop", + stepName: "Upload Mantis Slack desktop artifacts", + }, + { + workflowPath: MANTIS_TELEGRAM_DESKTOP_PROOF_WORKFLOW, + jobName: "run_telegram_desktop_proof", + stepName: "Upload Mantis Telegram desktop artifacts", + }, + { + workflowPath: MANTIS_TELEGRAM_LIVE_WORKFLOW, + jobName: "run_telegram_live", + stepName: "Upload Mantis Telegram artifacts", + }, + { + workflowPath: NPM_TELEGRAM_WORKFLOW, + jobName: "run_package_telegram_e2e", + stepName: "Upload npm Telegram E2E artifacts", + }, + ]; + + for (const item of cases) { + const label = `${item.workflowPath} ${item.jobName}`; + const uploadStep = workflowStep( + workflowJob(item.workflowPath, item.jobName), + item.stepName, + ); + + expect(uploadStep.if, label).toContain("always()"); + expect(uploadStep.uses, label).toBe(UPLOAD_ARTIFACT_V7); + expect(uploadStep.with?.["if-no-files-found"], label).toBe("error"); + } + }); + it("fails Docker E2E release lanes when summary artifacts are missing", () => { const cases = [ { diff --git a/test/scripts/test-projects.test.ts b/test/scripts/test-projects.test.ts index 473397fd2043..ac1766fe6422 100644 --- a/test/scripts/test-projects.test.ts +++ b/test/scripts/test-projects.test.ts @@ -1282,6 +1282,34 @@ describe("scripts/test-projects changed-target routing", () => { } }); + it("keeps Mantis proof workflow edits on workflow evidence regression tests", () => { + const packageAcceptanceTargets = [ + "test/scripts/package-acceptance-workflow.test.ts", + "test/scripts/ci-workflow-guards.test.ts", + ]; + const workflowTargets = new Map([ + [".github/workflows/mantis-discord-smoke.yml", packageAcceptanceTargets], + [".github/workflows/mantis-discord-status-reactions.yml", packageAcceptanceTargets], + [".github/workflows/mantis-discord-thread-attachment.yml", packageAcceptanceTargets], + [".github/workflows/mantis-slack-desktop-smoke.yml", packageAcceptanceTargets], + [ + ".github/workflows/mantis-telegram-desktop-proof.yml", + [ + "test/scripts/mantis-telegram-desktop-proof-workflow.test.ts", + "test/scripts/package-acceptance-workflow.test.ts", + "test/scripts/ci-workflow-guards.test.ts", + ], + ], + ]); + + for (const [workflowPath, targets] of workflowTargets) { + expect(resolveChangedTestTargetPlan([workflowPath])).toEqual({ + mode: "targets", + targets, + }); + } + }); + it("keeps release-check workflow edits on release workflow regression tests", () => { expect(resolveChangedTestTargetPlan([".github/workflows/openclaw-release-checks.yml"])).toEqual( {