Skip to content

Commit 982c62b

Browse files
author
David Cavazos
committed
check core.notice, core.info, and core.setFailed
1 parent 24e1885 commit 982c62b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/custard-ci.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,23 @@ jobs:
9191
console.log(`✅ [${path}]: ${cmd}`);
9292
} catch (e) {
9393
failed.push(path)
94-
console.log(`❌ [${path}]: ${cmd} (status ${e.status})`);
94+
console.log(`❌ [${path}]: ${cmd} (exit code ${e.status})`);
95+
core.error(e.message);
9596
console.log('--- stdout ---');
9697
console.log(e.stdout.toString("utf8"));
9798
console.log('--- stderr ---');
9899
console.log(e.stderr.toString("utf8"));
99-
core.error(`Linting failed in ${path}: ${e.message}`);
100100
}
101101
}
102-
console.log(`Passed: ${affected.length - failed.length}`)
103-
console.log(`Failed: ${failed.length}`)
102+
core.notice("Summary:")
103+
core.info("Summary:")
104+
console.log(` Passed: ${affected.length - failed.length}`)
105+
console.log(` Failed: ${failed.length}`)
104106
if (failed.length > 0) {
105107
for (const path of failed) {
106-
console.log(`- ❌ ${path}`)
108+
console.log(` - ❌ ${path}`)
107109
}
108-
process.exit(1)
110+
core.setFailed(`Failed '${cmd}' on ${JSON.stringify(failed)}`)
109111
}
110112
111113
region-tags:

0 commit comments

Comments
 (0)