linting added to CI + bypass tags
Some checks failed
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_mntx Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/payments_methods Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/payments_quotation Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_tgsettle Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/billing_documents Pipeline failed
ci/woodpecker/push/callbacks Pipeline failed
ci/woodpecker/push/discovery Pipeline failed
ci/woodpecker/push/bff Pipeline failed
ci/woodpecker/push/frontend Pipeline failed
ci/woodpecker/push/billing_fees Pipeline failed
ci/woodpecker/push/fx_ingestor Pipeline failed

This commit is contained in:
Stephan D
2026-03-10 12:39:30 +01:00
parent 6cc0340ba3
commit 918dbe8bb5
21 changed files with 455 additions and 126 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -eu
if ! set -o pipefail 2>/dev/null; then
@@ -11,9 +11,23 @@ if [ -z "${SERVICE}" ]; then
exit 2
fi
REPO_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
cd "${REPO_ROOT}"
if bypass_reason="$(sh "${SCRIPT_DIR}/should_bypass_backend_check.sh" "${SERVICE}" tests)"; then
echo "[backend-tests] ${bypass_reason}"
exit 0
fi
# shellcheck source=ci/scripts/common/backend_modules.sh
. "${SCRIPT_DIR}/backend_modules.sh"
if ! modules="$(backend_service_modules "${SERVICE}")"; then
echo "[backend-tests] unknown service key: ${SERVICE}" >&2
exit 2
fi
run_go_tests() {
module="$1"
if [ ! -f "${module}/go.mod" ]; then
@@ -28,114 +42,6 @@ run_go_tests() {
)
}
case "${SERVICE}" in
bff)
modules="
api/pkg
api/edge/bff
"
;;
callbacks)
modules="
api/pkg
api/edge/callbacks
"
;;
billing_documents)
modules="
api/pkg
api/billing/documents
"
;;
billing_fees)
modules="
api/pkg
api/billing/fees
"
;;
discovery)
modules="
api/pkg
api/discovery
"
;;
fx_ingestor)
modules="
api/pkg
api/fx/storage
api/fx/ingestor
"
;;
fx_oracle)
modules="
api/pkg
api/fx/storage
api/fx/oracle
"
;;
gateway_chain)
modules="
api/pkg
api/gateway/chain
"
;;
gateway_mntx)
modules="
api/pkg
api/gateway/mntx
"
;;
gateway_tgsettle)
modules="
api/pkg
api/gateway/tgsettle
"
;;
gateway_tron)
modules="
api/pkg
api/gateway/tron
"
;;
ledger)
modules="
api/pkg
api/ledger
"
;;
notification)
modules="
api/pkg
api/notification
"
;;
payments_methods)
modules="
api/pkg
api/payments/storage
api/payments/methods
"
;;
payments_orchestrator)
modules="
api/pkg
api/payments/storage
api/payments/orchestrator
"
;;
payments_quotation)
modules="
api/pkg
api/payments/storage
api/payments/quotation
"
;;
*)
echo "[backend-tests] unknown service key: ${SERVICE}" >&2
exit 2
;;
esac
for module in ${modules}; do
run_go_tests "${module}"
done