Skip to content

CI: pull built docker image for ITs #129

CI: pull built docker image for ITs

CI: pull built docker image for ITs #129

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_and_test:
name: "Check if BlazingMQ Java SDK can build and pass unit tests with JDK ${{ matrix.Java }}"
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Build and run unit tests with Maven
run: mvn --batch-mode -Dspotbugs.skip=true test
integration_test:
name: "Check if BlazingMQ Java SDK pass integration tests with JDK ${{ matrix.Java }}"
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build IT image
working-directory: bmq-sdk/src/test/docker
run: docker build --tag bmq-broker-java-it --build-arg "image=bloomberg/blazingmq:latest" .
- name: Build and run integration tests with Maven
timeout-minutes: 120
run: mvn --batch-mode -DskipUnitTests=true -Dspotbugs.skip=true -Dit.dockerImage=bloomberg/blazingmq:latest verify
- name: Compress collected broker logs
if: failure()
working-directory: /tmp/bmq-broker
run: tar -zcvf broker_logs.tar.gz /tmp/bmq-broker/bmq-broker-java-it*
- name: Upload broker logs as artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: broker_logs
path: /tmp/bmq-broker/broker_logs.tar.gz
retention-days: 5