|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +# |
| 19 | +# This is our most used build and the one used when a new PR is created/updated. It needs to |
| 20 | +# be and remain as green as possible. It is also executed when a PR is actually merged to make sure |
| 21 | +# apache/main stays stable. It runs a subset of the tests (the ones in the quick profile) to make sure it finishes |
| 22 | +# in a reasonable time. |
| 23 | +# |
| 24 | +name: CI Quick |
| 25 | + |
| 26 | +on: |
| 27 | + push: |
| 28 | + branches: [ "main", "activemq-6.2.x", "activemq-5.19.x" ] |
| 29 | + pull_request: |
| 30 | + branches: [ "main", "activemq-6.2.x", "activemq-5.19.x" ] |
| 31 | + |
| 32 | +concurrency: |
| 33 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 34 | + cancel-in-progress: true |
| 35 | + |
| 36 | +jobs: |
| 37 | + build: |
| 38 | + name: build |
| 39 | + |
| 40 | + permissions: |
| 41 | + contents: read |
| 42 | + |
| 43 | + timeout-minutes: 60 |
| 44 | + |
| 45 | + strategy: |
| 46 | + matrix: |
| 47 | + os: [ ubuntu-24.04, macos-26, windows-2025 ] |
| 48 | + java-version: [ 11 ] |
| 49 | + |
| 50 | + runs-on: ${{ matrix.os }} |
| 51 | + |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v6 |
| 54 | + - name: Set up JDK |
| 55 | + uses: actions/setup-java@v5 |
| 56 | + with: |
| 57 | + java-version: ${{ matrix.java-version }} |
| 58 | + distribution: temurin |
| 59 | + cache: 'maven' |
| 60 | + - name: Build |
| 61 | + run: mvn -U -B -e clean install -DskipTests |
| 62 | + - name: Verify |
| 63 | + run: mvn apache-rat:check |
| 64 | + |
| 65 | + test: |
| 66 | + name: test |
| 67 | + needs: build |
| 68 | + |
| 69 | + permissions: |
| 70 | + contents: read |
| 71 | + checks: write |
| 72 | + pull-requests: write |
| 73 | + |
| 74 | + timeout-minutes: 180 |
| 75 | + |
| 76 | + runs-on: ubuntu-24.04 |
| 77 | + |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@v6 |
| 80 | + - name: Set up JDK |
| 81 | + uses: actions/setup-java@v5 |
| 82 | + with: |
| 83 | + java-version: 11 |
| 84 | + distribution: temurin |
| 85 | + cache: 'maven' |
| 86 | + - name: Test |
| 87 | + run: mvn -B -e -fae verify -Pactivemq.tests-quick -Dsurefire.rerunFailingTestsCount=3 |
| 88 | + - name: Upload Test Results |
| 89 | + if: always() |
| 90 | + uses: actions/upload-artifact@v7 |
| 91 | + with: |
| 92 | + name: test-results |
| 93 | + path: '**/target/surefire-reports/*.xml' |
| 94 | + - name: Publish Test Results |
| 95 | + if: always() |
| 96 | + uses: EnricoMi/publish-unit-test-result-action@v2 |
| 97 | + with: |
| 98 | + large_files: true |
| 99 | + report_individual_runs: true |
| 100 | + report_suite_logs: error |
| 101 | + files: '**/target/surefire-reports/*.xml' |
0 commit comments