Skip to content

IT[BrokerSessionIT]: fix style (#70) #305

IT[BrokerSessionIT]: fix style (#70)

IT[BrokerSessionIT]: fix style (#70) #305

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:
get_dependencies:
name: "Dependencies"
uses: ./.github/workflows/dependencies.yaml
build_and_test:
name: "Build & UTs: 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: "ITs: JDK ${{ matrix.Java }}"
needs: get_dependencies
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: Get cached BlazingMQ docker image
id: cache-restore
uses: actions/cache/restore@v4
with:
path: blazingmq_image.tar.gz
key: ${{ needs.get_dependencies.outputs.cache_key }}
- name: Load base BlazingMQ docker image from cache
run: docker load < blazingmq_image.tar.gz
- name: Build IT image
working-directory: bmq-sdk/src/test/docker
run: docker build --tag bmq-broker-java-it --build-arg "image=bmqbrkr:latest" .
- name: Build and run integration tests with Maven
timeout-minutes: 120
run: mvn --batch-mode -DskipUnitTests=true -Dspotbugs.skip=true -Dit.dockerImage=bmqbrkr: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@v4
with:
name: broker_logs_${{ matrix.java }}
path: /tmp/bmq-broker/broker_logs.tar.gz
retention-days: 5