mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): preserve periphery artifacts across reruns (#122743)
This commit is contained in:
@@ -152,14 +152,17 @@ jobs:
|
||||
cp "$output_dir/periphery.stdout.json" "$output_dir/periphery.json"
|
||||
fi
|
||||
|
||||
# Failed-job reruns retain successful producer artifacts from the original attempt.
|
||||
# Keep artifact slots run-scoped; rerun producers overwrite their slot.
|
||||
- name: Upload iOS consumer report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: shared-periphery-ios-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
name: shared-periphery-ios-${{ github.run_id }}
|
||||
path: ${{ runner.temp }}/shared-periphery-ios
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
overwrite: true
|
||||
|
||||
scan-macos:
|
||||
name: Scan shared kit from macOS
|
||||
@@ -225,10 +228,11 @@ jobs:
|
||||
if: always()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: shared-periphery-macos-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
name: shared-periphery-macos-${{ github.run_id }}
|
||||
path: ${{ runner.temp }}/shared-periphery-macos
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
overwrite: true
|
||||
|
||||
intersect:
|
||||
name: Intersect shared OpenClawKit dead code
|
||||
@@ -247,13 +251,13 @@ jobs:
|
||||
- name: Download iOS consumer report
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
||||
with:
|
||||
name: shared-periphery-ios-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
name: shared-periphery-ios-${{ github.run_id }}
|
||||
path: ${{ runner.temp }}/shared-periphery-ios
|
||||
|
||||
- name: Download macOS consumer report
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
||||
with:
|
||||
name: shared-periphery-macos-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
name: shared-periphery-macos-${{ github.run_id }}
|
||||
path: ${{ runner.temp }}/shared-periphery-macos
|
||||
|
||||
- name: Intersect exact Swift identities
|
||||
@@ -269,7 +273,8 @@ jobs:
|
||||
if: always()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: shared-periphery-intersection-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
name: shared-periphery-intersection-${{ github.run_id }}
|
||||
path: ${{ runner.temp }}/shared-periphery-intersection
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
overwrite: true
|
||||
|
||||
@@ -19,7 +19,7 @@ type WorkflowStep = {
|
||||
id?: string;
|
||||
name?: string;
|
||||
run?: string;
|
||||
with?: { name?: string; path?: string; script?: string };
|
||||
with?: { name?: string; overwrite?: boolean; path?: string; script?: string };
|
||||
};
|
||||
|
||||
type Workflow = {
|
||||
@@ -148,8 +148,39 @@ describe("shared OpenClawKit Periphery workflow", () => {
|
||||
const macosUpload = workflow.jobs?.["scan-macos"]?.steps?.find(
|
||||
(step) => step.name === "Upload macOS consumer report",
|
||||
);
|
||||
expect(iosUpload?.with?.name).toContain("shared-periphery-ios-");
|
||||
expect(macosUpload?.with?.name).toContain("shared-periphery-macos-");
|
||||
const iosDownload = workflow.jobs?.intersect?.steps?.find(
|
||||
(step) => step.name === "Download iOS consumer report",
|
||||
);
|
||||
const macosDownload = workflow.jobs?.intersect?.steps?.find(
|
||||
(step) => step.name === "Download macOS consumer report",
|
||||
);
|
||||
const intersectionUpload = workflow.jobs?.intersect?.steps?.find(
|
||||
(step) => step.name === "Upload shared intersection",
|
||||
);
|
||||
|
||||
expect(iosUpload?.with?.name).toBe("shared-periphery-ios-${{ github.run_id }}");
|
||||
expect(iosDownload?.with?.name).toBe(iosUpload?.with?.name);
|
||||
expect(macosUpload?.with?.name).toBe("shared-periphery-macos-${{ github.run_id }}");
|
||||
expect(macosDownload?.with?.name).toBe(macosUpload?.with?.name);
|
||||
expect(intersectionUpload?.with?.name).toBe(
|
||||
"shared-periphery-intersection-${{ github.run_id }}",
|
||||
);
|
||||
|
||||
const artifactNames = [
|
||||
iosUpload?.with?.name,
|
||||
iosDownload?.with?.name,
|
||||
macosUpload?.with?.name,
|
||||
macosDownload?.with?.name,
|
||||
intersectionUpload?.with?.name,
|
||||
];
|
||||
expect(artifactNames).not.toContain(undefined);
|
||||
for (const artifactName of artifactNames) {
|
||||
expect(artifactName).not.toContain("github.run_attempt");
|
||||
}
|
||||
|
||||
expect(iosUpload?.with?.overwrite).toBe(true);
|
||||
expect(macosUpload?.with?.overwrite).toBe(true);
|
||||
expect(intersectionUpload?.with?.overwrite).toBe(true);
|
||||
});
|
||||
|
||||
it("retains the generated protocol contract and leaves findings for the intersection", () => {
|
||||
|
||||
Reference in New Issue
Block a user