Skip to content

Tests Manual

Tests Manual #6

Workflow file for this run

name: Tests Manual
description: |
This workflow is triggered manually to run integration tests on two different versions of the broker.
It requires two refs (branches, tags, or commit SHAs) to be specified as inputs.
The integration tests (ITs) are checked out from the specified branch.
Apart from the general ITs, the workflow runs a set of ITs with 3-node cluster which verify broker binary upgrade scenarios.
on:
workflow_dispatch:
inputs:
ref1:
description: 'Branch name, tag, or commit SHA #1'
required: true
ref2:
description: 'Branch name, tag, or commit SHA #2'
required: true
# The ref parameter is flexible and can accept:
# Branch names (e.g., main)
# Tag names (e.g., v1.2.3)
# Full commit SHAs (e.g., a1b2c3d4)
jobs:
get_dependencies:
name: "Dependencies"
uses: ./.github/workflows/dependencies.yaml
build1:
name: "Build ref ${{ github.event.inputs.ref1 }}"
needs: get_dependencies
uses: ./.github/workflows/build-ubuntu.yaml
with:
name: "build1"
ref: ${{ github.event.inputs.ref1 }}
target: "bmqbrkr bmqtool"
save_build_as_artifacts: true
run_unit_tests: false
build2:
name: "Build ref ${{ github.event.inputs.ref2 }}"
needs: get_dependencies
uses: ./.github/workflows/build-ubuntu.yaml
with:
name: "build2"
ref: ${{ github.event.inputs.ref2 }}
target: "bmqbrkr bmqtool"
save_build_as_artifacts: true
run_unit_tests: false
integration_tests_ubuntu_upgrade_version:
name: IT [${{ matrix.cluster }}/${{ matrix.mode }}/${{ matrix.consistency }}]
strategy:
matrix:
mode: ["legacy_mode"]
cluster: ["multi7"]
consistency: ["eventual_consistency", "strong_consistency"]
fail-fast: false
runs-on: ubuntu-latest
needs:
- build1
- build2
env:
RUN_UID: ${{ matrix.cluster }}_${{ matrix.mode }}_${{ matrix.consistency }}
steps:
- name: Checkout ITs repo
uses: actions/checkout@v4
with:
# The ref of the workflow that triggered this workflow
path: repoit
fetch-depth: 0
- name: Checkout repo1
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref1 }}
path: repo1
fetch-depth: 0
- name: Checkout repo2
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref2 }}
path: repo2
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
path: ./repo1
name: ${{needs.build1.outputs.artifact_key }}
- uses: actions/download-artifact@v4
with:
path: ./repo2
name: ${{needs.build2.outputs.artifact_key }}
# Set execution permissions for all .tsk
# which were lost when the artifact was created
- name: Chmod all .tsk
working-directory: repo1
run: find ./build -type f -name "*.tsk" -exec chmod +x {} +
- name: Chmod all .tsk
working-directory: repo2
run: find ./build -type f -name "*.tsk" -exec chmod +x {} +
- name: Run Integration Tests
working-directory: repoit
env:
# Broker default path for proxy nodes
BLAZINGMQ_BROKER: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
BLAZINGMQ_TOOL: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqtool/bmqtool.tsk"
# Broker path to be used after version upgrade
BLAZINGMQ_BROKER_NEW_VERSION: "${{ github.workspace }}/repo2/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
run: |
pip install -r ./src/python/requirements.txt
./src/integration-tests/run-tests \
"${{ matrix.mode }} and ${{ matrix.cluster }} and ${{ matrix.consistency }}" \
--log-level ERROR \
--log-file-level=info \
--bmq-tolerate-dirty-shutdown \
--bmq-log-dir=failure-logs \
--bmq-log-level=INFO \
--junitxml=integration-tests.xml \
--tb long \
--reruns=3 \
-n 0 \
-v
- name: Upload failure-logs as artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ github.run_id }}_failure_logs_${{ env.RUN_UID }}
path: ${{ github.workspace }}/repoit/src/integration-tests/failure-logs
retention-days: 5
integration_tests_ubuntu_two_versions_in_cluster:
name: IT [${{ matrix.cluster }}/${{ matrix.mode }}/${{ matrix.consistency }}]
strategy:
matrix:
mode: ["legacy_mode"]
cluster: ["multi"]
consistency: ["eventual_consistency", "strong_consistency"]
fail-fast: false
runs-on: ubuntu-latest
needs:
- build1
- build2
env:
RUN_UID: ${{ matrix.cluster }}_${{ matrix.mode }}_${{ matrix.consistency }}
steps:
- name: Checkout ITs repo
uses: actions/checkout@v4
with:
# The ref of the workflow that triggered this workflow
path: repoit
fetch-depth: 0
- name: Checkout repo1
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref1 }}
path: repo1
fetch-depth: 0
- name: Checkout repo2
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref2 }}
path: repo2
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
path: ./repo1
name: ${{needs.build1.outputs.artifact_key }}
- uses: actions/download-artifact@v4
with:
path: ./repo2
name: ${{needs.build2.outputs.artifact_key }}
# Set execution permissions for all .tsk
# which were lost when the artifact was created
- name: Chmod all .tsk
working-directory: repo1
run: find ./build -type f -name "*.tsk" -exec chmod +x {} +
- name: Chmod all .tsk
working-directory: repo2
run: find ./build -type f -name "*.tsk" -exec chmod +x {} +
- name: Run Integration Tests
working-directory: repoit
env:
# Broker default path for proxy nodes
BLAZINGMQ_BROKER: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
BLAZINGMQ_TOOL: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqtool/bmqtool.tsk"
# Brokers to use repo1:
BLAZINGMQ_BROKER_EAST1: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
BLAZINGMQ_BROKER_WEST2: "${{ github.workspace }}/repo1/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
# Brokers to use repo2:
BLAZINGMQ_BROKER_EAST2: "${{ github.workspace }}/repo2/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
BLAZINGMQ_BROKER_WEST1: "${{ github.workspace }}/repo2/build/blazingmq/src/applications/bmqbrkr/bmqbrkr.tsk"
run: |
go install github.com/kevwan/tproxy@latest
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
pip install -r ./src/python/requirements.txt
./src/integration-tests/run-tests \
"${{ matrix.mode }} and ${{ matrix.cluster }} and ${{ matrix.consistency }}" \
--log-level ERROR \
--log-file-level=info \
--bmq-tolerate-dirty-shutdown \
--bmq-log-dir=failure-logs \
--bmq-log-level=INFO \
--junitxml=integration-tests.xml \
--tb long \
--reruns=3 \
-n logical -v
- name: Upload failure-logs as artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ github.run_id }}_failure_logs_${{ env.RUN_UID }}
path: ${{ github.workspace }}/repoit/src/integration-tests/failure-logs
retention-days: 5