Skip to content

BP-008 Removed the cycle dependency between base event and order plac… #14

BP-008 Removed the cycle dependency between base event and order plac…

BP-008 Removed the cycle dependency between base event and order plac… #14

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
checks: write
pull-requests: write
repository-projects: read
contents: read
issues: read
jobs:
build:
runs-on: ubuntu-latest
services:
# Ensure docker-compose dependencies are started
postgres:
image: postgres:latest
ports:
- 5432:5432 # PostgreSQL port
kafka:
image: bitnami/kafka:latest
ports:
- 9092:9092 # Kafka port
steps:
# Check Docker Compose Version
- name: Check Docker Compose Version
run: docker compose --version
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Set up JDK 21
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
# Start Docker Compose services
- name: Spin up Docker Compose resources
run: docker compose up -d
timeout-minutes: 5
# Build and test with Gradle
- name: Build with Gradle
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: clean build -Djava.compiler.args="--enable-preview" --info --stacktrace
# Upload test results to GitHub
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/build/test-results/test/*.xml' # Make sure Gradle produces JUnit-style XML test reports
# Archive Test Reports as Artifacts
- name: Upload Test Reports
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Reports
path: '**/build/reports/tests/test' # Upload HTML test reports
# Clean up Docker Compose resources
- name: Clean up Docker Compose
run: docker compose down