Skip to content

Commit

Permalink
Github workflow to run kafka tests on different client-broker versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ozangunalp committed Sep 10, 2024
1 parent 055a756 commit abe6224
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/run-kafka-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run Kafka tests

on:
workflow_dispatch:
inputs:
kafkaCLientVersion:
description: 'Kafka Client version'
kafkaBrokerVersion:
description: 'Kafka Broker version'

jobs:
tests:
runs-on: ubuntu-latest
env:
KAFKA_VERSION: ${{ inputs.kafkaCLientVersion }}
KAFKA_CONTAINER_VERSION: ${{ inputs.kafkaBrokerVersion }}
name: Test with Kafka ${{ inputs.kafkaCLientVersion }} and Broker ${{ inputs.kafkaBrokerVersion }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- name: Build with Maven
run: mvn -s .build/ci-maven-settings.xml clean install -T1C -DskipTests
- name: Run Kafka tests
run: |
mvn -s .build/ci-maven-settings.xml -pl :smallrye-reactive-messaging-kafka -B verify \
${KAFKA_VERSION:+"-Dkafka.version=$KAFKA_VERSION"} \
${KAFKA_CONTAINER_VERSION:+"-Dkafka-container-version=$KAFKA_CONTAINER_VERSION"}
flaky-tests:
runs-on: ubuntu-latest
env:
KAFKA_VERSION: ${{ inputs.kafkaCLientVersion }}
KAFKA_CONTAINER_VERSION: ${{ inputs.kafkaBrokerVersion }}
name: Flaky Test with Kafka ${{ inputs.kafkaCLientVersion }} and Broker ${{ inputs.kafkaBrokerVersion }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- name: Build with Maven
run: mvn -s .build/ci-maven-settings.xml clean install -T1C -DskipTests
- name: Run Kafka tests
run: |
mvn -s .build/ci-maven-settings.xml -pl :smallrye-reactive-messaging-kafka -B verify -Pslow-flaky-tests \
${KAFKA_VERSION:+"-Dkafka.version=$KAFKA_VERSION"} \
${KAFKA_CONTAINER_VERSION:+"-Dkafka-container-version=$KAFKA_CONTAINER_VERSION"}

0 comments on commit abe6224

Please sign in to comment.