diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7c3b014a..bb5c0537 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -35,10 +35,8 @@ jobs: POSTGRES_DB: kartsell POSTGRES_USER: kartsell POSTGRES_PASSWORD: kartsell - # The Gitea runner already uses host port 5432 for its production tunnel. - # Keep the service isolated on a dedicated host port for CI. - ports: ["15432:5432"] options: >- + --network-alias postgres --health-cmd "pg_isready -U kartsell" --health-interval 10s --health-timeout 5s @@ -52,16 +50,16 @@ jobs: - run: dotnet build KArtSell.sln --no-restore -c Release - run: dotnet run --project src/KArtSell.DbMigrator -c Release --no-build env: - KARTSELL_POSTGRES: Host=localhost;Port=15432;Database=kartsell;Username=kartsell;Password=kartsell + KARTSELL_POSTGRES: Host=postgres;Port=5432;Database=kartsell;Username=kartsell;Password=kartsell - run: dotnet run --project src/KArtSell.DbMigrator -c Release --no-build env: - KARTSELL_POSTGRES: Host=localhost;Port=15432;Database=kartsell;Username=kartsell;Password=kartsell + KARTSELL_POSTGRES: Host=postgres;Port=5432;Database=kartsell;Username=kartsell;Password=kartsell - name: Run backend tests with hang evidence run: >- dotnet test KArtSell.sln --no-build -c Release --logger trx --blame-hang --blame-hang-timeout 2m env: - KARTSELL_POSTGRES: Host=localhost;Port=15432;Database=kartsell;Username=kartsell;Password=kartsell + KARTSELL_POSTGRES: Host=postgres;Port=5432;Database=kartsell;Username=kartsell;Password=kartsell - name: Check OpenAPI Breaking Changes (AEG-X-008) run: |