Skip to content

Task 35 - Implementation levels of risk disaster #224

Task 35 - Implementation levels of risk disaster

Task 35 - Implementation levels of risk disaster #224

Workflow file for this run

name: CI Pipeline
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.3
env:
POSTGRES_DB: disasterdb
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U user -d disasterdb"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: maven
- name: Wait for PostgreSQL to be ready
run: |
until pg_isready -h localhost -p 5432 -U user; do
echo "Waiting for PostgreSQL..."
sleep 5
done
- name: Build and Run Tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: mvn clean install