Skip to content

Commit b6e49f8

Browse files
committed
feat(eval): add source locations to github annotations
1 parent a6ad4d2 commit b6e49f8

9 files changed

Lines changed: 1178 additions & 550 deletions

File tree

.github/workflows/github-actions-reporter-example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ jobs:
4848
set -e
4949
5050
printf '%s\n' "$output"
51-
grep -Eq '^::error title=case [0-9]+ errored::intentional error from the GitHub Actions reporter example$' <<<"$output"
51+
grep -Eq '^::error title=case [0-9]+ errored,file=.*examples/eval-reporters/github-actions\.eval\.ts,line=22,col=13::intentional error from the GitHub Actions reporter example$' <<<"$output"
5252
test "$status" -ne 0

examples/eval-reporters/github-actions.eval.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ Eval("reporter-example", {
1919
],
2020
task: ({ message, shouldError }: Input): string => {
2121
if (shouldError) {
22-
throw new Error("intentional error from the GitHub Actions reporter example");
22+
throw new Error(
23+
"intentional error from the GitHub Actions reporter example",
24+
);
2325
}
2426
return message;
2527
},

0 commit comments

Comments
 (0)