Skip to content

add cors config to fix port issues #5

add cors config to fix port issues

add cors config to fix port issues #5

Workflow file for this run

name: CI Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: cyber_risk_db
POSTGRES_USER: cyberrisk
POSTGRES_PASSWORD: password123
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Maven
env:
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/cyber_risk_db
SPRING_DATASOURCE_USERNAME: cyberrisk
SPRING_DATASOURCE_PASSWORD: password123
GROQ_API_KEY: test-key
run: ./mvnw clean package -DskipTests
- name: Run tests
env:
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/cyber_risk_db
SPRING_DATASOURCE_USERNAME: cyberrisk
SPRING_DATASOURCE_PASSWORD: password123
GROQ_API_KEY: test-key
run: ./mvnw test