Skip to content

Commit a7fc765

Browse files
committed
build: expose the architecture to verify
1 parent 64daf70 commit a7fc765

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/development.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ jobs:
268268
start_ts=$(date +%s)
269269
until [ x$(curl \
270270
--silent --output /dev/null \
271-
-w '%{http_code}\n' --fail 'http://localhost:8080/') = x200 ]
271+
-w '%{http_code}\n' --fail 'http://localhost:8080/_health') = x200 ]
272272
do
273273
sleep 1
274274
if [ "$(expr "${start_ts}" \+ 30)" -lt "$(date +%s)" ]; then
@@ -278,7 +278,7 @@ jobs:
278278
done
279279
280280
rc=0
281-
printf '## Test (%s)\n\n' $platform | tee -a "$GITHUB_STEP_SUMMARY"
281+
printf '## Test (%s)\n\n' "$(curl 'http://localhost:8080/_arch')" | tee -a "$GITHUB_STEP_SUMMARY"
282282
(run_test "$test_command" | tee -a "$GITHUB_STEP_SUMMARY") || rc=$?
283283
if [ $rc -ne 0 ]; then
284284
exit $rc

examples/simple-flask/hello.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import platform
2+
13
from flask import Flask
24

35
app = Flask(__name__)
@@ -6,3 +8,13 @@
68
@app.route("/")
79
def hello_world() -> str:
810
return "<p>Hello, World!</p>"
11+
12+
13+
@app.route("/_health")
14+
def check_health() -> str:
15+
return "ok"
16+
17+
18+
@app.route("/_arch")
19+
def show_config() -> str:
20+
return platform.uname().machine

0 commit comments

Comments
 (0)