Skip to content

Add permissions and OpenAPI spec generation steps to release workflow #2

Add permissions and OpenAPI spec generation steps to release workflow

Add permissions and OpenAPI spec generation steps to release workflow #2

Workflow file for this run

name: PR Build Check
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build with Docker Compose
run: |
docker compose build
- name: Verify builds completed
run: |
echo "✅ Docker Compose build completed successfully"
docker images | grep memoryalpha-rag-api
- name: Test health endpoint readiness
run: |
# Start services in background
docker compose up -d
# Wait for services to be ready (max 5 minutes)
timeout 300 bash -c 'until curl -f http://localhost:8000/memoryalpha/health > /dev/null 2>&1; do sleep 5; echo "Waiting for API..."; done'
# Verify health endpoint
curl -f http://localhost:8000/memoryalpha/health
echo "✅ Health check passed"
- name: Test ask endpoint
run: |
# Test the synchronous ask endpoint with a simple query
response=$(curl -s -f "http://localhost:8000/memoryalpha/rag/ask?question=What%20is%20the%20Enterprise?&thinkingmode=DISABLED&max_tokens=100&top_k=3")
# Check if response contains expected content
if echo "$response" | grep -q "Enterprise"; then
echo "✅ Ask endpoint test passed"
else
echo "❌ Ask endpoint test failed - no relevant content found"
echo "Response: $response"
exit 1
fi
- name: Cleanup
if: always()
run: |
docker compose down -v
docker system prune -f