Repository navigation
fix: resolve scholarship data mismatch between backend and frontend #97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tanglaw — Post-Deploy Verification | |
| # After Render deploys, verifies the backend is healthy and seeded. | |
| # Database migrations and seeding happen automatically on Render via | |
| # backend/start.sh (Render supports IPv6; GitHub Actions does not). | |
| # | |
| # On first deploy, Render will take ~2-3 minutes to build + seed. | |
| # This workflow waits for that and checks the result. | |
| name: Post-Deploy Check | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Wait for Render deploy to finish | |
| run: | | |
| echo "Waiting for Render to deploy and seed the database..." | |
| for i in $(seq 1 30); do | |
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ | |
| --connect-timeout 5 https://tanglaw-api.onrender.com/api/health 2>/dev/null || echo "000") | |
| if [ "$STATUS" = "200" ]; then | |
| echo "✅ Render is healthy!" | |
| exit 0 | |
| fi | |
| echo " Attempt $i/30 — status $STATUS, waiting 10s..." | |
| sleep 10 | |
| done | |
| echo "❌ Render did not become healthy within 5 minutes." | |
| exit 1 | |
| - name: Verify the signup endpoint is responding | |
| run: | | |
| echo "Testing signup endpoint..." | |
| RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \ | |
| https://tanglaw-api.onrender.com/api/auth/signup \ | |
| -H "Content-Type: application/json" \ | |
| -H "Origin: https://tanglaw-project.vercel.app" \ | |
| -d '{"fullName":"","email":"bad-email","password":"x"}' 2>/dev/null) | |
| HTTP_CODE=$(echo "$RESPONSE" | tail -1) | |
| BODY=$(echo "$RESPONSE" | head -n -1) | |
| echo "Status: $HTTP_CODE" | |
| echo "Body: $BODY" | |
| if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "400" ] || [ "$HTTP_CODE" = "409" ]; then | |
| echo "✅ Signup endpoint is working!" | |
| exit 0 | |
| else | |
| echo "❌ Signup endpoint returned unexpected status $HTTP_CODE" | |
| exit 1 | |
| fi |