changes for aiven-common changes #2
This file contains hidden or 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
| # | |
| # Copyright 2025 Aiven Oy and project contributors | |
| # | |
| # Licensed 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. | |
| # | |
| # SPDX-License-Identifier: Apache-2 | |
| # Workflow to check pull requests main branches | |
| # This checks the source in the state as if after the merge. | |
| name: Pull request checks | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| # Disallow concurrent runs for the same PR by cancelling in-progress runs | |
| # when new commits are pushed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # builds aiven-commons and all modules. Does not deploy. | |
| build: | |
| strategy: | |
| matrix: | |
| java: [ 17, 20, 21, 25 ] | |
| fail-fast: false | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Configure artifact caching | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'adopt' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| - name: Build with Maven | |
| run: mvn -e -B -V -ntp clean verify | |
| # javadoc has issues with java 17 | |
| - name: Generate javadoc | |
| if: ${{ matrix.java != 17 }} | |
| run: mvn -e -B -V -ntp javadoc:javadoc | |
| - name: Build site | |
| if: ${{ matrix.java != 17 }} | |
| run: mvn -e -B -V -ntp site site:stage | |
| - name: "Upload build failure reports" | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: unit-test-results-${{ matrix.java }}-JDK | |
| path: | | |
| **/target/*-reports/** | |
| retention-days: 1 | |