ci: update Playwright workflow to use Docker compose
Some checks failed
Playwright Tests / test (pull_request) Failing after 3m3s

This commit is contained in:
Jan Gleytenhoover 2025-01-17 07:46:22 +01:00
parent 2d062da74f
commit 1daed7ec65
Signed by: jank
GPG key ID: 50620ADD22CD330B
2 changed files with 7 additions and 25 deletions

View file

@ -10,29 +10,6 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres-employee:
container_name: postgres_employee
image: postgres:13.3
environment:
POSTGRES_DB: employee_db
POSTGRES_USER: employee
POSTGRES_PASSWORD: secret
ports:
- "5432:5432"
employee:
container_name: employee
image: berndheidemann/employee-management-service:1.1.3
# image: berndheidemann/employee-management-service_without_keycloak:1.1
environment:
spring.datasource.url: jdbc:postgresql://postgres-employee:5432/employee_db
spring.datasource.username: employee
spring.datasource.password: secret
ports:
- "8089:8089"
depends_on:
- postgres-employee
steps:
# Checkout the repository
@ -43,6 +20,9 @@ jobs:
with:
node-version: lts/*
- name: Start container for api
run: docker compose up -d
# Install project dependencies
- name: Install dependencies
run: npm ci
@ -67,6 +47,10 @@ jobs:
env:
CI: true # Ensures Playwright runs in CI mode
- name: Stop container for api
run: docker compose up -d
# Upload Playwright report
- uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}

View file

@ -10,8 +10,6 @@ services:
POSTGRES_DB: employee_db
POSTGRES_USER: employee
POSTGRES_PASSWORD: secret
ports:
- "5432:5432"
employee:
container_name: employee