Skip to content

Commit e37b4cb

Browse files
fix: add errors and warnings to annotations (#26)
Use workflow syntax commands for making errors and warnings more visible through annotations on GitHub Actions. See docs [here](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-a-warning-message)
1 parent 8326c5a commit e37b4cb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ runs:
9797
9898
# Check if the status code is not 200
9999
if [ "$httpStatus" -ne 200 ]; then
100-
echo "Warning: Request failed with status code $httpStatus. Response: $responseBody"
100+
echo "::error title=Get Folder ID failed::Request failed with status code $httpStatus. Response: $responseBody"
101101
exit 1
102102
fi
103103
@@ -180,11 +180,11 @@ runs:
180180
testsFailed=1
181181
fi
182182
else
183-
echo "${projectName} contains no test cases set as publishable. Testing skipped."
183+
echo "::warning title=${projectName} contains no test cases set as publishable. Testing skipped."
184184
testResults+="\n- :warning: **${projectName} contains no test cases set as publishable. Testing skipped.**\n"
185185
fi
186186
else
187-
echo "${projectName} contains no test cases. Testing skipped."
187+
echo "::warning title=${projectName} contains no test cases. Testing skipped."
188188
testResults+="\n- :warning: **${projectName} contains no test cases. Testing skipped.**\n"
189189
fi
190190
echo "::endgroup::"
@@ -193,14 +193,14 @@ runs:
193193
194194
# Output that no tests were found
195195
if [ "$repositoryContainsTests" -eq 0 ]; then
196-
echo "No publishable UiPath test cases were found in this repository. Testing has been skipped."
196+
echo "::warning title=No publishable UiPath test cases were found in this repository. Testing has been skipped."
197197
echo "containsPublishableTestCases=false" >> $GITHUB_OUTPUT
198198
fi
199199
200200
echo -e "testResults<<EOF\n$testResults\nEOF" >> $GITHUB_OUTPUT
201201
202202
if [ "$testsFailed" -ne 0 ]; then
203-
echo "Tests failed"
203+
echo "::error title=Tests failed"
204204
exit 1
205205
fi
206206

0 commit comments

Comments
 (0)