S13: CI-CD review gate and run-review.sh (no ns1 auto-deploy)
Some checks are pending
review / inventory (push) Waiting to run
Some checks are pending
review / inventory (push) Waiting to run
This commit is contained in:
parent
257405ca61
commit
c71dce2187
6 changed files with 84 additions and 10 deletions
29
cicd/run-review.sh
Executable file
29
cicd/run-review.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# Run tests for NATS/PFC/messaging repos. Exit non-zero on first failure.
|
||||
# Does not deploy to ns1.
|
||||
set -euo pipefail
|
||||
ROOT="${RESEARCH:-$HOME/research}"
|
||||
fail=0
|
||||
run() {
|
||||
echo "=== $* ==="
|
||||
if ! "$@"; then
|
||||
echo "FAIL: $*"
|
||||
fail=1
|
||||
fi
|
||||
}
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
run env PYTHONPATH="$ROOT/peergos-for-compliance/lib:$ROOT/peergos-for-compliance-admin" \
|
||||
python3 -m unittest discover -s "$ROOT/peergos-for-compliance/tests" -v
|
||||
run env PYTHONPATH="$ROOT/secure-messaging/python" \
|
||||
python3 -m unittest discover -s "$ROOT/secure-messaging/tests" -v
|
||||
if [[ -d "$ROOT/secure-messaging/go" ]]; then
|
||||
( cd "$ROOT/secure-messaging/go" && run go test ./... )
|
||||
fi
|
||||
if [[ -f "$ROOT/nats-service-endpoints/catalog/endpoints.json" ]]; then
|
||||
run python3 -c "import json; json.load(open('$ROOT/nats-service-endpoints/catalog/endpoints.json'))"
|
||||
fi
|
||||
if [[ "$fail" -ne 0 ]]; then
|
||||
echo "REVIEW FAIL"
|
||||
exit 1
|
||||
fi
|
||||
echo "REVIEW PASS (no deploy)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue