diff --git a/.github/workflows/check-samples.yml b/.github/workflows/check-samples.yml index a158f755..0864f889 100644 --- a/.github/workflows/check-samples.yml +++ b/.github/workflows/check-samples.yml @@ -21,6 +21,7 @@ jobs: outputs: runjobs: ${{ steps.continue.outputs.runjobs }} project_version: ${{ steps.continue.outputs.project_version }} + boot_version: ${{ steps.continue.outputs.boot_version }} steps: - uses: actions/checkout@v3 - id: continue @@ -31,9 +32,14 @@ jobs: # Extract version from gradle.properties version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}') echo "project_version=$version" >>$GITHUB_OUTPUT + bootVersion=$(cat gradle/libs.versions.toml | grep "spring-boot = \"" | cut -d '"' -f2) + echo "boot_version=$bootVersion" >>$GITHUB_OUTPUT check_samples: name: Check Samples project needs: [prerequisites] + strategy: + matrix: + springBootVersion: [ needs.prerequisites.outputs.boot_version, '3.3.0-SNAPSHOT' ] runs-on: ubuntu-latest if: needs.prerequisites.outputs.runjobs steps: @@ -43,10 +49,12 @@ jobs: env: LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos VERSION: ${{ needs.prerequisites.outputs.project_version }} + BOOT_VERSION: ${{ matrix.springBootVersion }} run: | ./gradlew publishMavenJavaPublicationToLocalRepository ./gradlew \ --init-script ./spring-pulsar-sample-apps/sample-apps-check-ci.gradle \ -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" \ -PspringPulsarVersion="$VERSION" \ + -PspringBootVersion="$BOOT_VERSION" \ :runAllSampleTests diff --git a/spring-pulsar-sample-apps/sample-apps-check-ci.gradle b/spring-pulsar-sample-apps/sample-apps-check-ci.gradle index 29a21a9c..fafb3f1f 100644 --- a/spring-pulsar-sample-apps/sample-apps-check-ci.gradle +++ b/spring-pulsar-sample-apps/sample-apps-check-ci.gradle @@ -1,3 +1,16 @@ +settingsEvaluated { settings -> + + settings.pluginManagement { + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useVersion("$rootProject.springBootVersion") + } + } + } + } +} + allprojects { configurations.all { resolutionStrategy {