File tree Expand file tree Collapse file tree 5 files changed +88
-0
lines changed
Expand file tree Collapse file tree 5 files changed +88
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI - Docs validation
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ validate :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Set up Python (for some tools if needed)
15+ uses : actions/setup-python@v4
16+ with :
17+ python-version : ' 3.10'
18+ - name : Install dependencies
19+ run : |
20+ sudo apt-get update
21+ sudo apt-get install -y curl docker.io docker-compose-plugin shellcheck protobuf-compiler
22+ - name : Run validation
23+ run : |
24+ make validate
25+ make shellcheck
Original file line number Diff line number Diff line change 1+ SHELL := /bin/bash
2+ .PHONY : validate shellcheck quick-start
3+
4+ validate :
5+ @echo " Running project validation..."
6+ ./scripts/validate-setup.sh
7+
8+ shellcheck :
9+ @command -v shellcheck > /dev/null 2>&1 || { echo " shellcheck not found" ; exit 2; }
10+ @shellcheck scripts/* .sh || true
11+
12+ quick-start :
13+ @echo " Quick start (delegates to scripts/quick-start.sh)"
14+ @./scripts/quick-start.sh
Original file line number Diff line number Diff line change 1+ # PSA demo: minimal placeholder
2+
3+ This folder contains a minimal placeholder ` docker-compose.yml ` that demonstrates how
4+ to provide a one-command demo orchestration. It's intentionally tiny and should be
5+ replaced with real demo services for PSA.
6+
7+ Quick start:
8+
9+ ``` sh
10+ cd demo/psa
11+ docker compose up -d
12+ docker compose ps
13+ ```
14+
15+ Health check example:
16+
17+ ``` sh
18+ ./../../scripts/healthcheck.sh http://localhost:8080/health || true
19+ ```
Original file line number Diff line number Diff line change 1+ version : ' 3.8'
2+ services :
3+ psa-demo-placeholder :
4+ image : busybox:latest
5+ command : ["sh", "-c", "while true; do echo psa-demo running; sleep 60; done"]
6+ restart : unless-stopped
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # scripts/healthcheck.sh - simple service health check examples
3+ set -euo pipefail
4+
5+ if [[ $# -lt 1 ]]; then
6+ echo " Usage: $0 <url>"
7+ exit 2
8+ fi
9+
10+ URL=$1
11+
12+ if command -v curl > /dev/null 2>&1 ; then
13+ status=$( curl -s -o /dev/null -w " %{http_code}" " $URL " || true)
14+ if [[ " $status " =~ ^2 ]]; then
15+ echo " HEALTHY: $URL returned $status "
16+ exit 0
17+ else
18+ echo " UNHEALTHY: $URL returned $status "
19+ exit 1
20+ fi
21+ else
22+ echo " curl not installed; install curl to run health checks"
23+ exit 2
24+ fi
You can’t perform that action at this time.
0 commit comments