Skip to content

Fix the kafka producer memory leak issue #194

Fix the kafka producer memory leak issue

Fix the kafka producer memory leak issue #194

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
repository_dispatch:
types: contracts changed
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
java: [17]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: ${{ matrix.java }}
- name: Checkout Specmatic Kafka Repo
uses: actions/checkout@v4
with:
repository: znsio/specmatic-kafka
path: specmatic-kafka
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- name: Grant execute permission for gradlew
working-directory: specmatic-kafka
run: chmod +x gradlew
- name: Publish Specmatic Kafka to Local Maven Repo
working-directory: specmatic-kafka
run: ./gradlew publishToMavenLocal
- name: Grant execute permission for gradlew on BFF repo
run: chmod +x gradlew
- name: Build BFF project with Gradle
run: ./gradlew build
- name: Run coverage report
run: ./gradlew jacocoTestReport
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
if: matrix.os == 'ubuntu-latest'
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Get Workflow Definition ID
id: get_workflow_id
env:
GITHUB_TOKEN: ${{ secrets.SPECMATIC_INSIGHTS_ACCESS_TOKEN }}
run: |
api_url="https://api.github.com/repos/${{ github.repository }}/actions/workflows"
workflow_name="${{ github.workflow }}"
response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" $api_url)
workflow_id=$(echo "$response" | jq -r --arg workflow_name "$workflow_name" '.workflows[] | select(.name == $workflow_name) | .id')
echo "Workflow ID: $workflow_id" # Debug print
echo "workflow_id=$workflow_id" >> "$GITHUB_OUTPUT"
- name: Run Specmatic Insights Github Build Reporter
uses: znsio/[email protected]
with:
org-id: ${{ secrets.SPECMATIC_ORG_ID }}
branch-ref: ${{ github.ref }}
branch-name: ${{ github.ref_name }}
build-definition-id: ${{ steps.get_workflow_id.outputs.workflow_id }}
build-id: ${{ github.run_id }}
repo-name: ${{ github.event.repository.name }}
repo-id: ${{ github.repository_id }}
repo-url: ${{ github.event.repository.html_url }}