Skip to content

Commit 5837b5c

Browse files
committed
Use allSettled in CI
1 parent 1ba8056 commit 5837b5c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.dagger/src/index.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class AtomicServer {
6969

7070
@func()
7171
async ci(@argument() netlifyAuthToken: Secret): Promise<string> {
72-
await Promise.all([
72+
const results = await Promise.allSettled([
7373
this.docsPublish(netlifyAuthToken),
7474
this.typedocPublish(netlifyAuthToken),
7575
this.endToEnd(netlifyAuthToken),
@@ -80,6 +80,17 @@ export class AtomicServer {
8080
this.rustFmt(),
8181
]);
8282

83+
const failures = results.filter(
84+
(r): r is PromiseRejectedResult => r.status === "rejected",
85+
);
86+
87+
if (failures.length > 0) {
88+
const errorMessages = failures.map((f) => f.reason).join("\n");
89+
throw new Error(
90+
`CI pipeline failed with ${failures.length} errors:\n${errorMessages}`,
91+
);
92+
}
93+
8394
return "CI pipeline completed successfully";
8495
}
8596

0 commit comments

Comments
 (0)