ci: add PostgreSQL and employee service to workflow
Some checks failed
Playwright Tests / test (pull_request) Failing after 3m4s
Some checks failed
Playwright Tests / test (pull_request) Failing after 3m4s
This commit is contained in:
parent
408644ddad
commit
b8f1dab9f4
1 changed files with 23 additions and 8 deletions
31
.github/workflows/playwright.yml
vendored
31
.github/workflows/playwright.yml
vendored
|
@ -10,6 +10,29 @@ jobs:
|
||||||
test:
|
test:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
# Checkout the repository
|
# Checkout the repository
|
||||||
|
@ -20,9 +43,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
- name: Start container for api
|
|
||||||
run: docker compose up -d
|
|
||||||
|
|
||||||
# Install project dependencies
|
# Install project dependencies
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
@ -47,11 +67,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI: true # Ensures Playwright runs in CI mode
|
CI: true # Ensures Playwright runs in CI mode
|
||||||
|
|
||||||
- name: Stop container for api
|
|
||||||
if: always()
|
|
||||||
run: docker compose up -d
|
|
||||||
|
|
||||||
|
|
||||||
# Upload Playwright report
|
# Upload Playwright report
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue