Skip to content

Commit

Permalink
Generate error annotations when not publishing a check
Browse files Browse the repository at this point in the history
  • Loading branch information
nineinchnick committed Sep 16, 2024
1 parent 2b7ff4d commit 630e931
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions action-surefire-report/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ const action = async () => {
await publishReport(createCheck, name, commit, buildRetryingOctokitClient(), count, skipped, annotations, conclusion);
} else {
core.info('Not publishing test result due to skip_publishing=true');
for (const annotation of annotations) {
const properties = {
title: annotation.title,
file: annotation.path,
startLine: annotation.start_line,
endLine: annotation.end_line,
startColumn: annotation.start_column,
endColumn: annotation.end_column
};
core.error(annotation.message, properties);
}
}

// make conclusion consumable by downstream actions
Expand Down

0 comments on commit 630e931

Please sign in to comment.