diff --git a/.github/scripts/deployment-regression.sh b/.github/scripts/deployment-regression.sh index 7ef2a6ef6..e2d4a93b3 100755 --- a/.github/scripts/deployment-regression.sh +++ b/.github/scripts/deployment-regression.sh @@ -63,7 +63,7 @@ wait_for_services() { } check_installation() { - local port prefix user_count migration_status + local port prefix user_count migration_status expected_version setting_response wait_for_services port="$(env_value APP_PORT)" @@ -71,6 +71,16 @@ check_installation() { --retry 30 --retry-delay 2 --retry-connrefused \ "http://127.0.0.1:${port}/health" >/dev/null + expected_version="$(jq -r '.version' package.json)" + setting_response="$(curl --fail --silent --show-error \ + --retry 5 --retry-delay 2 --retry-connrefused \ + "http://127.0.0.1:${port}/api/system/setting")" + jq -e --arg expected_version "$expected_version" ' + .ret == 1 + and .data.reg == "open" + and .data.server_version == $expected_version + ' <<<"$setting_response" >/dev/null + prefix="$(table_prefix)" user_count="$(printf 'SELECT COUNT(*) FROM `%susers`;\n' "$prefix" | db_exec | tr -d '[:space:]')" if [[ ! "$user_count" =~ ^[1-9][0-9]*$ ]]; then diff --git a/.github/workflows/deployment-regression.yml b/.github/workflows/deployment-regression.yml index a97044802..332db6b08 100644 --- a/.github/workflows/deployment-regression.yml +++ b/.github/workflows/deployment-regression.yml @@ -102,6 +102,11 @@ jobs: - name: Install v1.6.89 run: sudo ./cmd install + - name: Reload v1.6.89 services + run: | + sudo ./cmd restart php + sudo ./cmd up + - name: Seed upgrade sentinel run: | "$RUNNER_TEMP/deployment-regression.sh" check-installation