From ee78ea533baeab7b66ac4bec56dafc02275761dd Mon Sep 17 00:00:00 2001 From: Denis Lugowski Date: Thu, 20 Nov 2025 10:34:12 +0100 Subject: [PATCH] fix(pipeline): Back to postgres service --- .gitea/workflows/pipeline.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml index e608fc9..d26c3ec 100644 --- a/.gitea/workflows/pipeline.yaml +++ b/.gitea/workflows/pipeline.yaml @@ -121,6 +121,21 @@ jobs: run: working-directory: ./legalconsenthub-backend + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_DB: legalconsenthub_test + POSTGRES_USER: test + POSTGRES_PASSWORD: test + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U test" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Checkout code uses: actions/checkout@v4 @@ -148,7 +163,10 @@ jobs: - name: Run tests run: ./gradlew test env: - SPRING_PROFILES_ACTIVE: testcontainers + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/legalconsenthub_test + SPRING_DATASOURCE_USERNAME: test + SPRING_DATASOURCE_PASSWORD: test + SPRING_JPA_HIBERNATE_DDL_AUTO: create-drop - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -179,8 +197,6 @@ jobs: platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - name: Image built successfully if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'