fix(pipeline): Back to postgres service

This commit is contained in:
2025-11-20 10:34:12 +01:00
parent 80357ff2ef
commit ee78ea533b

View File

@@ -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'