We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18888cf commit dbe1005Copy full SHA for dbe1005
1 file changed
.github/workflows/ci.yml
@@ -98,9 +98,24 @@ jobs:
98
99
- name: Check version endpoint
100
run: |
101
- curl -fsS http://localhost:8080/version | python3 - <<'PY'
102
- import json,sys
103
- data = json.load(sys.stdin)
+ for i in {1..5}; do
+ if curl -fsS http://localhost:8080/version -o /tmp/version.json; then
+ if [ -s /tmp/version.json ]; then
104
+ break
105
+ fi
106
107
+ sleep 1
108
+ done
109
+ if [ ! -s /tmp/version.json ]; then
110
+ echo "version response was empty"
111
+ cat /tmp/version.json || true
112
+ docker logs sma-ci || true
113
+ exit 1
114
115
+ python3 - <<'PY'
116
+ import json
117
+ with open("/tmp/version.json") as f:
118
+ data = json.load(f)
119
assert "version" in data
120
assert "lastUpdate" in data
121
print("version ok")
0 commit comments