diff --git a/.github/maven-settings.xml b/.github/maven-settings.xml new file mode 100644 index 00000000000..1a341607cdc --- /dev/null +++ b/.github/maven-settings.xml @@ -0,0 +1,53 @@ + + + + + + google-mirror + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + + + + google-mirror + + \ No newline at end of file diff --git a/.github/workflows/onPullRequest.yml b/.github/workflows/onPullRequest.yml new file mode 100644 index 00000000000..646bbfac4ea --- /dev/null +++ b/.github/workflows/onPullRequest.yml @@ -0,0 +1,110 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing +# permissions and limitations under the License. + +name: test Replication Plugin during PR + +on: [pull_request, workflow_dispatch] + +jobs: + test_build: + name: Test build on branch (${{ matrix.branch }}) + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + branch: [ 'feature/replica_broker', 'activemq-5.17.3.crdr' ] + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + - run: | + /usr/bin/git fetch || true + /usr/bin/git merge --no-edit --strategy-option theirs origin/${{ github.event.pull_request.head.ref }} --allow-unrelated-histories + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'corretto' + cache: maven + - name: Build with Maven + run: mvn -s .github/maven-settings.xml -U -B -e clean install -DskipTests + + replication_plugin_integration_tests: + name: Run replication plugin integration tests on new changes + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + branch: [ 'feature/replica_broker', 'activemq-5.17.3.crdr' ] + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + - run: | + /usr/bin/git fetch || true + /usr/bin/git merge --no-edit --strategy-option theirs origin/${{ github.event.pull_request.head.ref }} --allow-unrelated-histories + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'corretto' + cache: maven + - name: run plugin integration tests + run: mvn -s .github/maven-settings.xml -B -e -fae '-Dtest=org.apache.activemq.broker.replica.*Test' test + + full_test_suite: + name: Run full suite tests on new changes + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + branch: [ 'feature/replica_broker', 'activemq-5.17.3.crdr' ] + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + - run: | + /usr/bin/git fetch || true + /usr/bin/git merge --no-edit --strategy-option theirs origin/${{ github.event.pull_request.head.ref }} --allow-unrelated-histories + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'corretto' + cache: maven + - name: run full tests + run: mvn -s .github/maven-settings.xml -B -e -fae test -Dsurefire.rerunFailingTestsCount=3 + + verify_with_Rat: + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + branch: [ 'feature/replica_broker', 'activemq-5.17.3.crdr' ] + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + - run: | + /usr/bin/git fetch || true + /usr/bin/git merge --no-edit --strategy-option theirs origin/${{ github.event.pull_request.head.ref }} --allow-unrelated-histories + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'corretto' + cache: maven + - name: Running apache-rat:check + run: mvn apache-rat:check