From 1a070dee8026b7cceb878ee76692d137ee94b39b Mon Sep 17 00:00:00 2001 From: ShuaixinHuang <1836656514@qq.com> Date: Fri, 20 Nov 2026 07:00:53 +0800 Subject: [PATCH] fix(ci): replace portable artifacts when their jobs rerun (#12557) Co-authored-by: ShuaixinHuang --- .github/workflows/ci.yml | 5 +++++ tests/boundary/filesystem/ciTestReports.test.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc282db943..c42ce5454e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -320,6 +320,7 @@ jobs: if: ${{ !cancelled() }} with: name: vitest-report-source + overwrite: true path: .vitest/blob/* include-hidden-files: true if-no-files-found: error @@ -480,6 +481,7 @@ jobs: - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: rea-test-runtime + overwrite: true path: | dist/ skills/ @@ -501,6 +503,7 @@ jobs: - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: rea-build-cache + overwrite: true path: .cache/ci-build-cache/ include-hidden-files: true if-no-files-found: error @@ -631,6 +634,7 @@ jobs: if: needs.changes.outputs.code == 'true' && !cancelled() && hashFiles('test-results.json') != '' with: name: test-results + overwrite: true path: | test-results.xml test-results.json @@ -655,6 +659,7 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: test-timings-${{ needs.changes.outputs.tier }} + overwrite: true path: .cache/ci-test-history/test-results.json include-hidden-files: true if-no-files-found: error diff --git a/tests/boundary/filesystem/ciTestReports.test.ts b/tests/boundary/filesystem/ciTestReports.test.ts index 3d9cfcbe4a..eb616517ac 100644 --- a/tests/boundary/filesystem/ciTestReports.test.ts +++ b/tests/boundary/filesystem/ciTestReports.test.ts @@ -238,6 +238,7 @@ it("requires portable report validation even when the timing report is missing", it("keeps diagnosis available after merge failure and publishes only complete successful history", async () => { const steps = (await workflow()).test!.steps; const diagnosis = steps.find((step) => step.with?.name === "test-results"); + expect(diagnosis?.with?.overwrite).toBe(true); expect(diagnosis?.if).toContain("!cancelled()"); expect(diagnosis?.if).not.toContain("success()"); const history = steps.find( @@ -256,6 +257,7 @@ it("keeps diagnosis available after merge failure and publishes only complete su expect(history?.with?.name).toBe( "test-timings-${{ needs.changes.outputs.tier }}", ); + expect(history?.with?.overwrite).toBe(true); expect(history?.with?.path).toBe(".cache/ci-test-history/test-results.json"); const buildSteps = (await workflow()).build!.steps; const lookup = buildSteps.find((step) =>