Skip to content

chore(deps): update dependency org.springframework.kafka:spring-kafka to v4 #1235

chore(deps): update dependency org.springframework.kafka:spring-kafka to v4

chore(deps): update dependency org.springframework.kafka:spring-kafka to v4 #1235

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
repository_dispatch:
types: contracts changed
jobs:
buildAndTest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: docker
testName: ContractTestsUsingTestContainer
needsCliInstall: false
- name: cli
testName: ContractTestUsingCLITest
needsCliInstall: true
- name: junit
testName: ContractTests
needsCliInstall: false
env:
CTRF_REPORT_PATH: './build/reports/specmatic/test/ctrf/*.json'
steps:
- name: Checkout project
uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Save Specmatic license
if: github.ref == 'refs/heads/main'
run: |
mkdir -p ~/.specmatic
echo "${{ secrets.SPECMATIC_LICENSE_KEY }}" > ~/.specmatic/specmatic-license.txt
- name: Download Specmatic Enterprise Jar
if: ${{ matrix.needsCliInstall }}
run: curl https://docs.specmatic.io/install-specmatic-enterprise.sh | bash
- name: Run BFF Contract Test
run: ./gradlew test --tests="com.component.orders.contract.${{ matrix.testName }}"
- name: Upload CTRF Report
uses: actions/upload-artifact@v6
if: always() # Run even if tests fail
with:
name: ctrf-report-${{ matrix.name }}
path: ${{ env.CTRF_REPORT_PATH }}
retention-days: 5
# Display CTRF test results
- name: Publish Test Results
uses: ctrf-io/github-test-reporter@v1
if: always() # Run even if tests fail
with:
report-path: ${{ env.CTRF_REPORT_PATH }}
- name: Run coverage report without re-running the tests
run: ./gradlew jacocoTestReport -x test
- 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
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Publish Build Reports to Specmatic Insights
if: github.ref == 'refs/heads/main'
run: |
docker run \
-v ${{ github.workspace }}:/workspace \
-v ${{ github.workspace }}/specmatic.yaml:/workspace/specmatic.yaml \
-v ~/.specmatic:/root/.specmatic \
-w /workspace \
specmatic/enterprise \
send-report \
--metadata build_url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
--branch-name ${{ github.ref_name }} \
--repo-name ${{ github.event.repository.name }} \
--repo-id ${{ github.repository_id }} \
--repo-url ${{ github.event.repository.html_url }}
- name: Upload HTML Test Report
uses: actions/upload-artifact@v6
with:
name: html-report-${{ matrix.name }}
path: build/reports/specmatic/html
docker:
if: github.ref == 'refs/heads/main'
needs: buildAndTest
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout project
uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
run: echo ${{ secrets.SPECMATIC_DOCKER_HUB_TOKEN }} | docker login -u ${{ vars.SPECMATIC_DOCKER_HUB_USERNAME }} --password-stdin
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
- name: Assemble project for Docker image
run: ./gradlew assemble
- name: Build and push Docker image (multi-platform)
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ github.repository }}:latest
labels: ${{ steps.meta.outputs.labels }}