Skip to content

Fix BRAILA: adresaCompleta pattern bug and add test data (#385) #81

Fix BRAILA: adresaCompleta pattern bug and add test data (#385)

Fix BRAILA: adresaCompleta pattern bug and add test data (#385) #81

Workflow file for this run

name: API End-to-End Tests
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
test-alba:
runs-on: ubuntu-latest
steps:
- name: Test endpoint /ROMANIA/ALBA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/ALBA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: ALBA county"
test-arad:
runs-on: ubuntu-latest
needs: test-alba
steps:
- name: Test endpoint /ROMANIA/ARAD/
run: |
URL="https://orase.peviitor.ro/ROMANIA/ARAD/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: ARAD county"
test-arges:
runs-on: ubuntu-latest
needs: test-arad
steps:
- name: Test endpoint /ROMANIA/ARGES/
run: |
URL="https://orase.peviitor.ro/ROMANIA/ARGES/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: ARGES county"
test-bacau:
runs-on: ubuntu-latest
needs: test-arges
steps:
- name: Test endpoint /ROMANIA/BACAU/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BACAU/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BACAU county"
test-bihor:
runs-on: ubuntu-latest
needs: test-bacau
steps:
- name: Test endpoint /ROMANIA/BIHOR/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BIHOR/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BIHOR county"
test-bistrita-nasaud:
runs-on: ubuntu-latest
needs: test-bihor
steps:
- name: Test endpoint /ROMANIA/BISTRITA-NASAUD/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BISTRITA-NASAUD/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BISTRITA-NASAUD county"
test-botosani:
runs-on: ubuntu-latest
needs: test-bistrita-nasaud
steps:
- name: Test endpoint /ROMANIA/BOTOSANI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BOTOSANI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BOTOSANI county"
test-braila:
runs-on: ubuntu-latest
needs: test-botosani
steps:
- name: Test endpoint /ROMANIA/BRAILA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BRAILA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BRAILA county"
test-brasov:
runs-on: ubuntu-latest
needs: test-braila
steps:
- name: Test endpoint /ROMANIA/BRASOV/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BRASOV/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BRASOV county"
test-buzau:
runs-on: ubuntu-latest
needs: test-brasov
steps:
- name: Test endpoint /ROMANIA/BUZAU/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BUZAU/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BUZAU county"
test-calarasi:
runs-on: ubuntu-latest
needs: test-buzau
steps:
- name: Test endpoint /ROMANIA/CALARASI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/CALARASI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: CALARASI county"
test-caras-severin:
runs-on: ubuntu-latest
needs: test-calarasi
steps:
- name: Test endpoint /ROMANIA/CARAS-SEVERIN/
run: |
URL="https://orase.peviitor.ro/ROMANIA/CARAS-SEVERIN/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: CARAS-SEVERIN county"
test-cluj:
runs-on: ubuntu-latest
needs: test-caras-severin
steps:
- name: Test endpoint /ROMANIA/CLUJ/
run: |
URL="https://orase.peviitor.ro/ROMANIA/CLUJ/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: CLUJ county"
test-constanta:
runs-on: ubuntu-latest
needs: test-cluj
steps:
- name: Test endpoint /ROMANIA/CONSTANTA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/CONSTANTA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: CONSTANTA county"
test-covasna:
runs-on: ubuntu-latest
needs: test-constanta
steps:
- name: Test endpoint /ROMANIA/COVASNA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/COVASNA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: COVASNA county"
test-dambovita:
runs-on: ubuntu-latest
needs: test-covasna
steps:
- name: Test endpoint /ROMANIA/DAMBOVITA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/DAMBOVITA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: DAMBOVITA county"
test-dolj:
runs-on: ubuntu-latest
needs: test-dambovita
steps:
- name: Test endpoint /ROMANIA/DOLJ/
run: |
URL="https://orase.peviitor.ro/ROMANIA/DOLJ/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: DOLJ county"
test-galati:
runs-on: ubuntu-latest
needs: test-dolj
steps:
- name: Test endpoint /ROMANIA/GALATI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/GALATI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: GALATI county"
test-giurgiu:
runs-on: ubuntu-latest
needs: test-galati
steps:
- name: Test endpoint /ROMANIA/GIURGIU/
run: |
URL="https://orase.peviitor.ro/ROMANIA/GIURGIU/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: GIURGIU county"
test-gorj:
runs-on: ubuntu-latest
needs: test-giurgiu
steps:
- name: Test endpoint /ROMANIA/GORJ/
run: |
URL="https://orase.peviitor.ro/ROMANIA/GORJ/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: GORJ county"
test-harghita:
runs-on: ubuntu-latest
needs: test-gorj
steps:
- name: Test endpoint /ROMANIA/HARGHITA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/HARGHITA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: HARGHITA county"
test-hunedoara:
runs-on: ubuntu-latest
needs: test-harghita
steps:
- name: Test endpoint /ROMANIA/HUNEDOARA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/HUNEDOARA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: HUNEDOARA county"
test-ialomita:
runs-on: ubuntu-latest
needs: test-hunedoara
steps:
- name: Test endpoint /ROMANIA/IALOMITA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/IALOMITA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: IALOMITA county"
test-iasi:
runs-on: ubuntu-latest
needs: test-ialomita
steps:
- name: Test endpoint /ROMANIA/IASI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/IASI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: IASI county"
test-ilfov:
runs-on: ubuntu-latest
needs: test-iasi
steps:
- name: Test endpoint /ROMANIA/ILFOV/
run: |
URL="https://orase.peviitor.ro/ROMANIA/ILFOV/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: ILFOV county"
test-maramures:
runs-on: ubuntu-latest
needs: test-ilfov
steps:
- name: Test endpoint /ROMANIA/MARAMURES/
run: |
URL="https://orase.peviitor.ro/ROMANIA/MARAMURES/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: MARAMURES county"
test-mehedinti:
runs-on: ubuntu-latest
needs: test-maramures
steps:
- name: Test endpoint /ROMANIA/MEHEDINTI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/MEHEDINTI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: MEHEDINTI county"
test-mures:
runs-on: ubuntu-latest
needs: test-mehedinti
steps:
- name: Test endpoint /ROMANIA/MURES/
run: |
URL="https://orase.peviitor.ro/ROMANIA/MURES/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: MURES county"
test-neamt:
runs-on: ubuntu-latest
needs: test-mures
steps:
- name: Test endpoint /ROMANIA/NEAMT/
run: |
URL="https://orase.peviitor.ro/ROMANIA/NEAMT/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: NEAMT county"
test-olt:
runs-on: ubuntu-latest
needs: test-neamt
steps:
- name: Test endpoint /ROMANIA/OLT/
run: |
URL="https://orase.peviitor.ro/ROMANIA/OLT/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: OLT county"
test-prahova:
runs-on: ubuntu-latest
needs: test-olt
steps:
- name: Test endpoint /ROMANIA/PRAHOVA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/PRAHOVA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: PRAHOVA county"
test-salaj:
runs-on: ubuntu-latest
needs: test-prahova
steps:
- name: Test endpoint /ROMANIA/SALAJ/
run: |
URL="https://orase.peviitor.ro/ROMANIA/SALAJ/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: SALAJ county"
test-satumare:
runs-on: ubuntu-latest
needs: test-salaj
steps:
- name: Test endpoint /ROMANIA/SATUMARE/
run: |
URL="https://orase.peviitor.ro/ROMANIA/SATUMARE/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: SATUMARE county"
test-sibiu:
runs-on: ubuntu-latest
needs: test-satumare
steps:
- name: Test endpoint /ROMANIA/SIBIU/
run: |
URL="https://orase.peviitor.ro/ROMANIA/SIBIU/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: SIBIU county"
test-suceava:
runs-on: ubuntu-latest
needs: test-sibiu
steps:
- name: Test endpoint /ROMANIA/SUCEAVA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/SUCEAVA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: SUCEAVA county"
test-teleorman:
runs-on: ubuntu-latest
needs: test-suceava
steps:
- name: Test endpoint /ROMANIA/TELEORMAN/
run: |
URL="https://orase.peviitor.ro/ROMANIA/TELEORMAN/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: TELEORMAN county"
test-timis:
runs-on: ubuntu-latest
needs: test-teleorman
steps:
- name: Test endpoint /ROMANIA/TIMIS/
run: |
URL="https://orase.peviitor.ro/ROMANIA/TIMIS/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: TIMIS county"
test-tulcea:
runs-on: ubuntu-latest
needs: test-timis
steps:
- name: Test endpoint /ROMANIA/TULCEA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/TULCEA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: TULCEA county"
test-valcea:
runs-on: ubuntu-latest
needs: test-tulcea
steps:
- name: Test endpoint /ROMANIA/VALCEA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/VALCEA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: VALCEA county"
test-vaslui:
runs-on: ubuntu-latest
needs: test-valcea
steps:
- name: Test endpoint /ROMANIA/VASLUI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/VASLUI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: VASLUI county"
test-vrancea:
runs-on: ubuntu-latest
needs: test-vaslui
steps:
- name: Test endpoint /ROMANIA/VRANCEA/
run: |
URL="https://orase.peviitor.ro/ROMANIA/VRANCEA/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: VRANCEA county"
test-bucuresti:
runs-on: ubuntu-latest
needs: test-vrancea
steps:
- name: Test endpoint /ROMANIA/BUCURESTI/
run: |
URL="https://orase.peviitor.ro/ROMANIA/BUCURESTI/"
echo "Testing: $URL"
RESPONSE=$(curl -s -w "\n%{http_code}" "$URL")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" != "200" ]; then
echo "❌ FAILED: HTTP $HTTP_CODE"
echo "Response: $BODY"
exit 1
fi
echo "✓ HTTP 200 OK"
if echo "$BODY" | grep -qi "php error\|parse error\|fatal error\|warning"; then
echo "❌ FAILED: PHP error detected"
echo "$BODY"
exit 1
fi
echo "✓ No PHP errors"
if ! echo "$BODY" | jq . > /dev/null 2>&1; then
echo "❌ FAILED: Invalid JSON response"
echo "$BODY"
exit 1
fi
echo "✓ Valid JSON"
if [ -z "$BODY" ] || [ "$BODY" = "[]" ] || [ "$BODY" = "{}" ]; then
echo "❌ FAILED: Empty response"
exit 1
fi
echo "✓ Response not empty"
echo "✅ PASSED: BUCURESTI county"