Skip to content

docs(design): add quality attribute profile #17

docs(design): add quality attribute profile

docs(design): add quality attribute profile #17

name: Validate Platform Readiness
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: src/Codex.Web/package-lock.json
- name: Create CI configuration files
shell: bash
run: |
cat > .env <<EOF
POSTGRES_USER=strata
POSTGRES_PASSWORD=strata
POSTGRES_DB=strata
POSTGRES_PORT=5432
STRATA_API_PORT=8080
STRATA_DB_CONNECTION=Host=localhost;Port=5432;Database=strata;Username=strata;Password=strata
STRATA_SOURCES=${GITHUB_WORKSPACE}/docs
STRATA_EMBED_PROVIDER=
STRATA_EMBED_MODEL=
STRATA_LOG_LEVEL=Information
EOF
cat > src/Codex.Web/.env.local <<EOF
NEXT_PUBLIC_STRATA_API_BASE_URL=http://127.0.0.1:8080
EOF
- name: Build .NET solution
run: dotnet build Codex.slnx
- name: Install web dependencies
working-directory: src/Codex.Web
run: npm install
- name: Build web shell
working-directory: src/Codex.Web
run: npm run build
- name: Validate Docker Compose configuration
run: docker compose -f ops/docker-compose.yml --env-file .env config > /dev/null
- name: Probe API readiness
shell: bash
env:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://127.0.0.1:5180
Codex__DocsRootPath: ${{ github.workspace }}/docs
ConnectionStrings__Default: Host=localhost;Port=5432;Database=strata;Username=strata;Password=strata
run: |
dotnet run --project src/Codex.Api/Codex.Api.csproj --no-build --no-launch-profile > api.log 2>&1 &
api_pid=$!
cleanup() {
if kill -0 "$api_pid" 2>/dev/null; then
kill "$api_pid"
wait "$api_pid" || true
fi
}
trap cleanup EXIT
for _ in $(seq 1 30); do
if curl --fail --silent http://127.0.0.1:5180/health > /dev/null; then
break
fi
if ! kill -0 "$api_pid" 2>/dev/null; then
cat api.log
exit 1
fi
sleep 2
done
curl --fail --silent http://127.0.0.1:5180/health > /dev/null
if ! curl --fail --silent http://127.0.0.1:5180/openapi/v1.json > /dev/null; then
cat api.log
echo "OpenAPI endpoint did not return a successful response."
exit 1
fi