Improve handling of Client Reply Context and SET requests #505
Workflow file for this run
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
| # This workflow will build a Java project with Maven | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| release: | |
| types: [ created ] | |
| env: | |
| JAVA_REFERENCE_VERSION: 17 | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] # TODO add: windows-latest, macOS-latest | |
| java: [ 17, 21 ] | |
| fail-fast: false | |
| max-parallel: 6 | |
| name: Test JDK ${{ matrix.java }}, ${{ matrix.os }} | |
| environment: configure coverage | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - name: Fetch tags | |
| run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| - id: version | |
| uses: ./.github/actions/get-version | |
| - uses: actions/cache@v4 # cache maven packages to speed up build | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Set up JDK ${{matrix.java}} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{matrix.java}} | |
| distribution: 'temurin' | |
| - name: Get binary for testing cross-compatibility with opencmw-cpp | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| continue-on-error: true | |
| run: | | |
| gh release download -R fair-acc/opencmw-cpp compatiblity-test-util -p CompatibilityTest -D . | |
| chmod +x ./CompatibilityTest | |
| - name: Test with Maven | |
| run: mvn -Dgpg.skip=true --no-transfer-progress --batch-mode -Drevision=${REVISION} -Dsha1=${SHA1} -Dchangelist=${CHANGELIST} package | |
| env: | |
| REVISION: ${{ steps.version.outputs.revision }} | |
| SHA1: ${{ steps.version.outputs.sha1 }} | |
| CHANGELIST: ${{ steps.version.outputs.changelist }} | |
| - name: coverage report - send to Codecov | |
| if: matrix.java == env.JAVA_REFERENCE_VERSION | |
| uses: codecov/codecov-action@v5 | |
| - name: coverage report - send to Codacy | |
| if: matrix.java == env.JAVA_REFERENCE_VERSION | |
| uses: codacy/[email protected] | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| publish: | |
| name: Deploy to github packages and Sonatype OSSRH | |
| needs: test | |
| runs-on: ubuntu-latest | |
| environment: deploy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: version | |
| uses: ./.github/actions/get-version | |
| - name: Fetch tags | |
| run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| - name: Cache the Maven packages to speed up build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Set up JDK ${{ env.JAVA_REFERENCE_VERSION }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_REFERENCE_VERSION }} | |
| distribution: 'temurin' | |
| gpg-private-key: ${{ secrets.GPG_KEY }} | |
| gpg-passphrase: GPG_PASS | |
| - name: Deploy to Github Packages | |
| run: if [ -z "$CHANGELIST" ]; then mvn -DskipTests --no-transfer-progress --batch-mode -Drevision=${REVISION} -Dsha1=${SHA1} -Dchangelist=${CHANGELIST} -Drelease=github deploy; fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GPG_PASS: ${{ secrets.GPG_PASSPHRASE }} | |
| REVISION: ${{ steps.version.outputs.revision }} | |
| SHA1: ${{ steps.version.outputs.sha1 }} | |
| CHANGELIST: ${{ steps.version.outputs.changelist }} | |
| - name: Set up JDK to publish to maven central | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_REFERENCE_VERSION }} | |
| distribution: 'temurin' | |
| server-id: central | |
| server-username: SONATYPE_USER | |
| server-password: SONATYPE_PASS | |
| # gpg-private-key: ${{ secrets.GPG_KEY }} # gpg key was already added in the first java-setup phase, will fail the cleanup if added again | |
| gpg-passphrase: GPG_PASS | |
| - name: Print contents of ~/.m2/settings.xml | |
| run: cat ~/.m2/settings.xml | |
| - name: Deploy to Maven Central | |
| run: mvn -DskipTests --no-transfer-progress --batch-mode -Drevision=${REVISION} -Dsha1=${SHA1} -Dchangelist=${CHANGELIST} -Drelease=central deploy | |
| env: | |
| GPG_PASS: ${{ secrets.GPG_PASSPHRASE }} | |
| SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
| SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }} | |
| REVISION: ${{ steps.version.outputs.revision }} | |
| SHA1: ${{ steps.version.outputs.sha1 }} | |
| CHANGELIST: ${{ steps.version.outputs.changelist }} | |
| ... |