Skip to content

Commit

Permalink
[CI] Add Spring Boot 3.3.0 compatibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc committed Jan 14, 2024
1 parent 1f26084 commit ba05e7e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/check-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
13 changes: 13 additions & 0 deletions spring-pulsar-sample-apps/sample-apps-check-ci.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
settingsEvaluated { settings ->

settings.pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "org.springframework.boot") {
useVersion("$rootProject.springBootVersion")
}
}
}
}
}

allprojects {
configurations.all {
resolutionStrategy {
Expand Down

0 comments on commit ba05e7e

Please sign in to comment.