File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 2222 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
2323 with :
2424 fetch-depth : 0
25-
25+
2626 - name : Install uv
2727 uses : astral-sh/setup-uv@1781c6eb42f98d67097986d30130a8ff6879fda2
2828
@@ -37,17 +37,32 @@ jobs:
3737 uses : hiero-ledger/hiero-solo-action@6a1a77601cf3e69661fb6880530a4edf656b40d5 # v0.14.0
3838 with :
3939 installMirrorNode : true
40-
4140 - name : Run Examples
4241 env :
4342 OPERATOR_ID : ${{ steps.solo.outputs.accountId }}
4443 OPERATOR_KEY : ${{ steps.solo.outputs.privateKey }}
4544 CHAIN_ID : 012A
4645 NETWORK : solo
46+ shell : bash
4747 run : |
48+ set -euo pipefail
4849 files=$(ls examples/*.py)
50+
4951 for file in $files;
5052 do
5153 echo -e "\n************ ${file} ************"
52- uv run -m examples.$(basename "$file" .py)
53- done
54+
55+ module="examples.$(basename "$file" .py)"
56+
57+ # Run the example and capture both stdout and stderr
58+ if ! output=$(uv run -m "$module" 2>&1); then
59+ echo -e "\n❌ Example failed: ${file}"
60+ echo "************ Error Output ************"
61+ echo "$output"
62+ echo "**************************************"
63+ exit 1
64+ fi
65+
66+ echo "$output"
67+ echo "✅ Completed ${file} successfully."
68+ done
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
166166- Add strict type hints to ` TransactionGetReceiptQuery ` (#420 )
167167- Fixed broken documentation links in CONTRIBUTING.md by converting absolute GitHub URLs to relative paths
168168- Updated all documentation references to use local paths instead of pointing to hiero-sdk project hub
169+ - chore: fix the examples workflow to log error messages and run on import failure (#738 )
169170
170171## [ 0.1.5] - 2025-09-25
171172
You can’t perform that action at this time.
0 commit comments