@@ -83,17 +83,43 @@ runs:
83
83
pip install -r requirements.txt
84
84
cd ..
85
85
shell : bash
86
- - name : Wait for the PC node 1 to start
86
+ - name : Wait for partner-chains-node-1 to start
87
+ id : wait-pc-node
88
+ continue-on-error : true
87
89
run : |
90
+ # Wait for the Cardano node to be ready
88
91
while ! docker exec cardano-node-1 [ -e /shared/cardano.ready ]; do sleep 1; done
89
92
echo "Cardano network is ready! Waiting for Partner Chain first node to start..."
90
93
INIT_TIMESTAMP=$(docker exec cardano-node-1 cat /shared/cardano.start)
91
94
echo "INIT_TIMESTAMP=$INIT_TIMESTAMP" >> $GITHUB_ENV
92
- while ! docker exec partner-chains-node-1 [ -e /shared/partner-chains-node-1.ready ]; do \
93
- epoch=$(docker exec cardano-node-1 cardano-cli query tip --testnet-magic 42 | jq -r .epoch) && \
94
- echo "Epoch: $epoch" && \
95
- sleep 10; \
95
+ epoch=0
96
+ while ! docker exec partner-chains-node-1 [ -e /shared/partner-chains-node-1.ready ]; do
97
+ epoch=$(docker exec cardano-node-1 cardano-cli query tip --testnet-magic 42 | jq -r .epoch)
98
+ echo "Epoch: $epoch"
99
+ if [ "$epoch" -ge 3 ]; then
100
+ echo "MC has reached epoch 3 and partner-chains-node-1 is still not ready. Failing test and gathering logs."
101
+ exit 1
102
+ fi
103
+ sleep 10
104
+ done
105
+ shell : bash
106
+ - name : Collect and zip Docker logs
107
+ run : |
108
+ mkdir -p docker_logs
109
+ docker ps -a --format '{{.Names}}' | while read line; do
110
+ echo "Collecting logs for container $line"
111
+ docker logs "$line" > "docker_logs/$line.log" 2>&1 || true
96
112
done
113
+ zip -r docker_logs.zip docker_logs/
114
+ shell : bash
115
+ - name : Upload Docker logs artifact
116
+ uses : actions/upload-artifact@v4
117
+ with :
118
+ name : docker_logs
119
+ path : docker_logs.zip
120
+ - name : Fail the job
121
+ if : ${{ steps.wait-pc-node.outcome == 'failure' }}
122
+ run : exit 1
97
123
shell : bash
98
124
- name : Run smoke tests
99
125
uses : ./.github/actions/tests/run-e2e-tests
0 commit comments