Add dynamic-client end-to-end test against real Connect model #3741
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
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| pull-requests: write | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| name: Auto-format | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.PR_TOKEN }} | |
| - name: Check if last commit is from bot | |
| id: check-bot | |
| run: | | |
| LAST_AUTHOR=$(git log -1 --format='%an') | |
| if [ "$LAST_AUTHOR" = "github-actions[bot]" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Set up JDK 21 | |
| if: steps.check-bot.outputs.skip != 'true' | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'corretto' | |
| - name: Cache compiled buildscripts | |
| if: steps.check-bot.outputs.skip != 'true' | |
| uses: actions/cache@v5 | |
| with: | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('buildSrc/**/*.kts') }} | |
| path: | | |
| ./buildSrc/build | |
| - name: Setup Gradle | |
| if: steps.check-bot.outputs.skip != 'true' | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| gradle-home-cache-includes: | | |
| caches | |
| - name: Run spotlessApply | |
| if: steps.check-bot.outputs.skip != 'true' | |
| run: ./gradlew spotlessApply | |
| - name: Commit formatting changes | |
| if: steps.check-bot.outputs.skip != 'true' | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "Auto-format: apply spotless formatting" | |
| git push | |
| fi | |
| build: | |
| needs: [format] | |
| if: always() && !cancelled() | |
| runs-on: ${{ matrix.os }} | |
| name: Java ${{ matrix.java }} ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| java: [21] | |
| os: [macos-latest, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'corretto' | |
| - name: Cache compiled buildscripts | |
| uses: actions/cache@v5 | |
| with: | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('buildSrc/**/*.kts') }} | |
| path: | | |
| ./buildSrc/build | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| gradle-home-cache-includes: | | |
| caches | |
| - name: Clean, build and javadoc | |
| run: ./gradlew clean build javadoc -Plog-tests --stacktrace | |
| - name: Integration tests | |
| run: ./gradlew integ -Plog-tests --stacktrace | |
| - name: Allow long file names in git for windows | |
| if: matrix.os == 'windows-latest' | |
| run: git config --system core.longpaths true | |
| - uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: java-${{ matrix.java }}-${{ matrix.os }}-test-report | |
| path: '**/build/reports/tests' |