From b879906fecfda435c05aae15254e5f6e9b8572b7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Apr 2026 16:27:08 +0800 Subject: [PATCH] test(ci): add supply domain stability rerun check --- scripts/ci/supply_domain_stability_check.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/ci/supply_domain_stability_check.sh diff --git a/scripts/ci/supply_domain_stability_check.sh b/scripts/ci/supply_domain_stability_check.sh new file mode 100644 index 00000000..0020f9f6 --- /dev/null +++ b/scripts/ci/supply_domain_stability_check.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +SUPPLY_API_DIR="${ROOT_DIR}/supply-api" +ITERATIONS="${1:-20}" + +if ! [[ "${ITERATIONS}" =~ ^[0-9]+$ ]] || [[ "${ITERATIONS}" -lt 1 ]]; then + echo "usage: bash scripts/ci/supply_domain_stability_check.sh [iterations>=1]" >&2 + exit 1 +fi + +cd "${SUPPLY_API_DIR}" + +for i in $(seq 1 "${ITERATIONS}"); do + echo "[supply-domain-stability] iteration=${i}/${ITERATIONS}" + go test -count=1 ./internal/domain +done + +echo "[supply-domain-stability] PASS iterations=${ITERATIONS}"