From d34f723db8abbf8a05e8e2347b405ddad9ed23e7 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sun, 16 Aug 2026 22:20:07 -0300 Subject: [PATCH] =?UTF-8?q?spike(OPS50):=20probe=20de=20service=20postgres?= =?UTF-8?q?=20em=20porta=20pr=C3=B3pria=20no=20runner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .forgejo/workflows/spike-services.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .forgejo/workflows/spike-services.yml diff --git a/.forgejo/workflows/spike-services.yml b/.forgejo/workflows/spike-services.yml new file mode 100644 index 00000000..28339547 --- /dev/null +++ b/.forgejo/workflows/spike-services.yml @@ -0,0 +1,36 @@ +name: Spike — service postgres em porta própria + +on: + push: + branches: [OPS50-spike-services] + +jobs: + probe: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:17-alpine + env: + POSTGRES_USER: teqo + POSTGRES_PASSWORD: teqo + POSTGRES_DB: teqo_test + ports: + - 5433:5432 + options: >- + --health-cmd "pg_isready -U teqo" + --health-interval 5s + --health-timeout 5s + --health-retries 12 + steps: + - name: Probe TCP localhost:5433 + run: | + set -euo pipefail + for i in $(seq 1 20); do + if (echo > /dev/tcp/localhost/5433) 2>/dev/null; then + echo "CONNECTED to localhost:5433" + exit 0 + fi + sleep 2 + done + echo "FAILED to reach localhost:5433" + exit 1