| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # license agreements; and to You under the Apache License, version 2.0: |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # This file is part of the Apache Pekko project, which was derived from Akka. |
| # |
| |
| name: Integration Tests for Kafka |
| |
| on: |
| pull_request: |
| push: |
| branches: |
| - main |
| tags-ignore: [ v.* ] |
| |
| jobs: |
| test: |
| name: Build and Test Integration for Kafka |
| runs-on: ubuntu-22.04 |
| if: github.repository == 'apache/pekko-projection' |
| strategy: |
| fail-fast: false |
| matrix: |
| include: |
| - { java-version: 17, scala-version: 2.13, sbt-opts: '' } |
| - { java-version: 17, scala-version: 3.3, sbt-opts: '' } |
| - { java-version: 17, scala-version: next, sbt-opts: '' } |
| steps: |
| - name: Checkout |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| with: |
| fetch-depth: 0 |
| fetch-tags: true |
| |
| - name: Checkout GitHub merge |
| if: github.event.pull_request |
| run: |- |
| git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch |
| git checkout scratch |
| |
| - name: Setup JDK ${{ matrix.java-version }} |
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 |
| with: |
| java-version: ${{ matrix.java-version }} |
| distribution: temurin |
| |
| - name: Install sbt |
| uses: sbt/setup-sbt@3afe9cf056c5d139bfc46579af1192d77a2f0821 # v1.4.0 |
| |
| - name: Cache Coursier cache |
| uses: coursier/cache-action@95e5b1029b6b86e7bac033ee44a0697d8a527d2d # v8.1.1 |
| |
| - name: Run all integration tests with Scala ${{ matrix.scala-version }} and Java ${{ matrix.java-version }} |
| run: |- |
| scala_version="$(bash .github/scripts/resolve-scala-version.sh "${{ matrix.scala-version }}")" |
| sbt "++${scala_version}!" kafka-test/test ${{ matrix.sbt-opts }} |
| env: # Disable Ryuk resource reaper since we always spin up fresh VMs |
| TESTCONTAINERS_RYUK_DISABLED: true |
| |
| - name: Print logs on failure |
| if: ${{ failure() }} |
| run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; |