Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI error messages #107

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/run-bandit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ pdm run bandit --r emote experiments tests -ll > diff.txt || EXIT_CODE=$?

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "bandit"
:warning: \`bandit\` found issues with your code. Please fix the below, and update your PR.
:warning: \`bandit\` found issues with your code. Please fix the below issues, and update your PR.

\`\`\`diff
$(cat diff.txt)
\`\`\`

EOF
else
buildkite-agent annotate "✅ \`bandit\` found no code issues." --style "success" --context "eslint"
buildkite-agent annotate "✅ \`bandit\` found no code issues." --style "success" --context "bandit"
fi

exit $EXIT_CODE
2 changes: 1 addition & 1 deletion .buildkite/run-black.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pdm run black --check --diff emote tests experiments > diff.txt || EXIT_CODE=$?

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "black"
:warning: Your code isn't formatted by \`black\`. Please fix the below diffs, or run \`pdm run black emote tests\` to automatically format it.
:warning: Your code isn't formatted by \`black\`. Please fix the below diffs, or run \`pdm run black emote tests experiments\` to automatically format it.
\`\`\`diff
$(cat diff.txt)
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-isort.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cat diff.txt

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "isort"
:warning: Your imports aren't sorted by \`isort\`. Please fix the below diffs, or run \`pdm run isort emote\` to automatically format it.
:warning: Your imports aren't sorted by \`isort\`. Please fix the below diffs, or run \`pdm run isort emote tests experiments\` to automatically format it.
\`\`\`diff
$(cat diff.txt)
Expand Down