Skip to content

Commit d12055c

Browse files
committed
mock + progress
1 parent c6bc542 commit d12055c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/cardano-node.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ jobs:
7171
echo "Release: ${{ steps.anti.outputs.release }}"
7272
ls -la anti-cli
7373
sudo install -m 0755 anti-cli/anti /usr/local/bin/anti
74+
anti --version
7475
7576
- name: Submit test
77+
id: request
7678
env:
7779
ANTI_GITHUB_PAT: ${{ secrets.ANTI_GITHUB_PAT }}
7880
ANTI_WALLET_FILE: wallet.json
@@ -89,14 +91,22 @@ jobs:
8991
TRY=$(($TRY + 1)) # start with try=1
9092
echo "TRY=$TRY"
9193
# TODO: use duration or DEFAULT_DURATION
92-
anti requester create-test -d compose/testnets/cardano_node_with_adversary -c ${{ github.sha }} -r "cardano-foundation/antithesis" --try $TRY -t 1
93-
#
94+
# RESULT=$(anti requester create-test -d compose/testnets/cardano_node_with_adversary -c ${{ github.sha }} -r "cardano-foundation/antithesis" --try $TRY -t 1)
95+
RESULT='{"txHash":"3fec16b1c7db6107146d18401f2a061ddaafe3a382e58d0297bd0113f9af1039","value":{"state":{"duration":1,"phase":"pending","signature":"977dca1597c2d92d25a597505adc36092541f6c6932ea6af11e2611b4b65ff8868fd6c25c8e314d6b2f74fab08ba97fd8a03d371c08ff8708e1f41a54f3d850c"},"testRunId":"43b510664edb6acec0b9b5c9fe66deddce1099064ccd6c4fc52cddcd606b8a08"}}'
96+
echo $RESULT
97+
9498
# TXID=#result
9599
# set output
100+
echo "id=$(echo $RESULT | jq -r .value.testRunId)" >> "$GITHUB_OUTPUT"
101+
echo "txHash=$(echo $RESULT | jq -r .txHash)" >> "$GITHUB_OUTPUT"
96102
97103
- name: Wait for results
98104
run: |
99-
echo "waiting... (todo: poll results)"
100-
TXID= from output from prev step, with id
105+
function query_run() { anti facts test-runs --whose cfhal | jq 'map(select(.id == "${{ steps.request.outputs.id }}"))[0]'; }
106+
# TODO: handle rejected phase values
107+
until [[ $(query_run() | jq .value.phase) != "pending" ]]; do
108+
sleep 10
109+
done
101110
111+
[[ $(query_run() | jq .value.phase) == "finished" ]]
102112

0 commit comments

Comments
 (0)