ci: update checkout and expose API verification

This commit is contained in:
kuaifan 2026-08-10 23:27:13 +00:00
parent 0d320c2d89
commit d798e55382
2 changed files with 5 additions and 3 deletions

View File

@ -72,6 +72,7 @@ check_installation() {
"http://127.0.0.1:${port}/health" >/dev/null
expected_version="$(jq -r '.version' package.json)"
echo "Checking database-backed API: GET /api/system/setting (expected version: ${expected_version})"
setting_response="$(curl --fail --silent --show-error \
--retry 5 --retry-delay 2 --retry-connrefused \
"http://127.0.0.1:${port}/api/system/setting")"
@ -80,6 +81,7 @@ check_installation() {
and .data.reg == "open"
and .data.server_version == $expected_version
' <<<"$setting_response" >/dev/null
echo "Database-backed API check passed: ret=1, reg=open, server_version=${expected_version}"
prefix="$(table_prefix)"
user_count="$(printf 'SELECT COUNT(*) FROM `%susers`;\n' "$prefix" | db_exec | tr -d '[:space:]')"

View File

@ -18,7 +18,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout pro
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install
run: sudo ./cmd install
@ -45,7 +45,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
@ -89,7 +89,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0