mirror of
https://github.com/kuaifan/dootask.git
synced 2026-08-24 21:58:37 +00:00
ci: update checkout and expose API verification
This commit is contained in:
parent
0d320c2d89
commit
d798e55382
2
.github/scripts/deployment-regression.sh
vendored
2
.github/scripts/deployment-regression.sh
vendored
@ -72,6 +72,7 @@ check_installation() {
|
|||||||
"http://127.0.0.1:${port}/health" >/dev/null
|
"http://127.0.0.1:${port}/health" >/dev/null
|
||||||
|
|
||||||
expected_version="$(jq -r '.version' package.json)"
|
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 \
|
setting_response="$(curl --fail --silent --show-error \
|
||||||
--retry 5 --retry-delay 2 --retry-connrefused \
|
--retry 5 --retry-delay 2 --retry-connrefused \
|
||||||
"http://127.0.0.1:${port}/api/system/setting")"
|
"http://127.0.0.1:${port}/api/system/setting")"
|
||||||
@ -80,6 +81,7 @@ check_installation() {
|
|||||||
and .data.reg == "open"
|
and .data.reg == "open"
|
||||||
and .data.server_version == $expected_version
|
and .data.server_version == $expected_version
|
||||||
' <<<"$setting_response" >/dev/null
|
' <<<"$setting_response" >/dev/null
|
||||||
|
echo "Database-backed API check passed: ret=1, reg=open, server_version=${expected_version}"
|
||||||
|
|
||||||
prefix="$(table_prefix)"
|
prefix="$(table_prefix)"
|
||||||
user_count="$(printf 'SELECT COUNT(*) FROM `%susers`;\n' "$prefix" | db_exec | tr -d '[:space:]')"
|
user_count="$(printf 'SELECT COUNT(*) FROM `%susers`;\n' "$prefix" | db_exec | tr -d '[:space:]')"
|
||||||
|
|||||||
6
.github/workflows/deployment-regression.yml
vendored
6
.github/workflows/deployment-regression.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout pro
|
- name: Checkout pro
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: sudo ./cmd install
|
run: sudo ./cmd install
|
||||||
@ -45,7 +45,7 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user