Add Netty dep - needed for WebSocket client. #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: HiveMQ Platform Operator Integration Tests | |
on: | |
push: | |
branches: | |
- "**" | |
workflow_dispatch: | |
concurrency: | |
group: hivemq-operator-platform-integration-test-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
platform-integration-test-compose: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
test-plan: [ Upgrade, Extensions, NonRootUser, Other ] | |
steps: | |
- name: Checkout HiveMQ Platform Helm Charts | |
uses: actions/checkout@v3 | |
with: | |
path: helm-charts | |
- name: Set up Docker QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Login to Container Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Checkout HiveMQ Platform Operator on the default branch | |
uses: actions/checkout@v3 | |
with: | |
repository: hivemq/hivemq-platform-operator | |
token: ${{ secrets.JENKINS_TOKEN }} | |
path: hivemq-platform-operator | |
- name: Checkout HiveMQ Platform Operator on the same branch | |
run: | | |
echo "Checking if branch \"${GITHUB_REF_NAME}\" exists on hivemq-platform-operator" | |
cd hivemq-platform-operator | |
BRANCH=$(git ls-remote origin ${GITHUB_REF_NAME}) | |
if [[ -n "${BRANCH}" ]]; then | |
echo "Checking out branch with the same name" | |
git fetch --all | |
git checkout origin/${GITHUB_REF_NAME} | |
fi | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Run HiveMQ Platform Operator integration tests | |
uses: gradle/gradle-build-action@v2 | |
env: | |
TEST_PLAN: ${{ matrix.test-plan }} | |
with: | |
cache-disabled: true | |
gradle-home-cache-includes: | | |
caches | |
notifications | |
jdks | |
gradle-home-cache-cleanup: true | |
build-root-directory: helm-charts | |
arguments: | | |
:tests-hivemq-platform-operator:integrationTest --tests "*.compose.*" | |
- name: Upload HiveMQ Platform Operator test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test results HiveMQ Platform Operator - Compose ${{ matrix.test-plan }} | |
path: | | |
helm-charts/tests-hivemq-platform-operator/build/reports/tests/integrationTest/ | |
helm-charts/tests-hivemq-platform-operator/build/test-results/integrationTest/*.xml | |
retention-days: 5 | |
platform-integration-test-single: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
test-plan: [ CustomConfig, Services1, Services2, Platform, NonRootUser, Other ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: helm-charts | |
- name: Set up Docker QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Login to Container Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Checkout HiveMQ Platform Operator on the default branch | |
uses: actions/checkout@v3 | |
with: | |
repository: hivemq/hivemq-platform-operator | |
token: ${{ secrets.JENKINS_TOKEN }} | |
path: hivemq-platform-operator | |
- name: Checkout HiveMQ Platform Operator on the same branch | |
run: | | |
echo "Checking if branch \"${GITHUB_REF_NAME}\" exists on hivemq-platform-operator" | |
cd hivemq-platform-operator | |
BRANCH=$(git ls-remote origin ${GITHUB_REF_NAME}) | |
if [[ -n "${BRANCH}" ]]; then | |
echo "Checking out branch with the same name" | |
git fetch --all | |
git checkout origin/${GITHUB_REF_NAME} | |
fi | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Run HiveMQ Platform Operator integration tests | |
uses: gradle/gradle-build-action@v2 | |
env: | |
TEST_PLAN: ${{ matrix.test-plan }} | |
with: | |
cache-disabled: true | |
gradle-home-cache-includes: | | |
caches | |
notifications | |
jdks | |
gradle-home-cache-cleanup: true | |
build-root-directory: helm-charts | |
arguments: | | |
:tests-hivemq-platform-operator:integrationTest --tests "*.single.*" | |
- name: Upload HiveMQ Platform Operator test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test results HiveMQ Platform Operator - Single ${{ matrix.test-plan }} | |
path: | | |
helm-charts/tests-hivemq-platform-operator/build/reports/tests/integrationTest/ | |
helm-charts/tests-hivemq-platform-operator/build/test-results/integrationTest/*.xml | |
retention-days: 5 |