Skip to content

Test against supported Java versions #469

Test against supported Java versions

Test against supported Java versions #469

name: Test against supported Java versions
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
distribution: [ 'temurin' ]
version: [ '11', '17', '21', '23', '24-ea' ]
include:
- distribution: 'semeru'
version: '17'
name: Test against Java ${{ matrix.distribution }} ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- name: Checkout tls-gen
uses: actions/checkout@v4
with:
repository: rabbitmq/tls-gen
path: './tls-gen'
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.version }}
cache: 'maven'
- name: Start broker
run: ci/start-broker.sh
- name: Start toxiproxy
run: ci/start-toxiproxy.sh
- name: Display Java version
run: ./mvnw --version
- name: Test
run: |
./mvnw verify -Drabbitmqctl.bin=DOCKER:rabbitmq --no-transfer-progress \
-Dca.certificate=./tls-gen/basic/result/ca_certificate.pem \
-Dclient.certificate=./tls-gen/basic/result/client_$(hostname)_certificate.pem \
-Dclient.key=./tls-gen/basic/result/client_$(hostname)_key.pem \
-Dnet.bytebuddy.experimental=true -Dspotbugs.skip=true
- name: Stop toxiproxy
run: docker stop toxiproxy && docker rm toxiproxy
- name: Stop broker
run: docker stop rabbitmq && docker rm rabbitmq
- name: Start cluster
run: ci/start-cluster.sh
- name: Test against cluster
run: ./mvnw test -Dtest="*ClusterTest" -Drabbitmqctl.bin=DOCKER:rabbitmq0
- name: Stop cluster
run: docker compose --file ci/cluster/docker-compose.yml down