-
-
Notifications
You must be signed in to change notification settings - Fork 461
Create Test Matrix for Spring Boot #4741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c1d64e7
Create Test Matrix for Spring Boot
adinauer 86f2ae1
caching
adinauer 7063026
ignore android changes
adinauer 9ee5377
Merge branch 'main' into feat/spring-boot-test-matrix
adinauer 9a81fb9
Add missing otel samples / auto init false
adinauer 363c3bb
Merge branch 'main' into feat/spring-boot-test-matrix
adinauer 81a3412
Merge branch 'main' into feat/spring-boot-test-matrix
adinauer b7bc6c1
add spring modules
adinauer 0efd513
fix used module
adinauer 4698e42
comment out spring boot 4 noagent for now
adinauer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| name: Spring Boot 2.x Matrix | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - '**/sentry-android/**' | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| spring-boot-2-matrix: | ||
| timeout-minutes: 45 | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| springboot-version: [ '2.1.0', '2.2.5', '2.4.13', '2.5.15', '2.6.15', '2.7.0', '2.7.18' ] | ||
|
|
||
| name: Spring Boot ${{ matrix.springboot-version }} | ||
| env: | ||
| SENTRY_URL: http://127.0.0.1:8000 | ||
| GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
|
|
||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.10.5' | ||
|
|
||
| - name: Install Python dependencies | ||
| run: | | ||
| python3 -m pip install --upgrade pip | ||
| python3 -m pip install -r requirements.txt | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| # Workaround for https://github.com/gradle/actions/issues/21 to use config cache | ||
| - name: Cache buildSrc | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: buildSrc/build | ||
| key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }} | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a | ||
| with: | ||
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
|
|
||
| - name: Update Spring Boot 2.x version | ||
| run: | | ||
| sed -i 's/^springboot2=.*/springboot2=${{ matrix.springboot-version }}/' gradle/libs.versions.toml | ||
| echo "Updated Spring Boot 2.x version to ${{ matrix.springboot-version }}" | ||
|
|
||
| - name: Exclude android modules from build | ||
| run: | | ||
| sed -i \ | ||
| -e '/.*"sentry-android-ndk",/d' \ | ||
| -e '/.*"sentry-android",/d' \ | ||
| -e '/.*"sentry-compose",/d' \ | ||
| -e '/.*"sentry-android-core",/d' \ | ||
| -e '/.*"sentry-android-fragment",/d' \ | ||
| -e '/.*"sentry-android-navigation",/d' \ | ||
| -e '/.*"sentry-android-sqlite",/d' \ | ||
| -e '/.*"sentry-android-timber",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android-benchmark",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android-critical",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:test-app-sentry",/d' \ | ||
| -e '/.*"sentry-samples:sentry-samples-android",/d' \ | ||
| -e '/.*"sentry-android-replay",/d' \ | ||
| settings.gradle.kts | ||
|
|
||
| - name: Exclude android modules from ignore list | ||
| run: | | ||
| sed -i \ | ||
| -e '/.*"sentry-uitest-android",/d' \ | ||
| -e '/.*"sentry-uitest-android-benchmark",/d' \ | ||
| -e '/.*"sentry-uitest-android-critical",/d' \ | ||
| -e '/.*"test-app-sentry",/d' \ | ||
| -e '/.*"sentry-samples-android",/d' \ | ||
| build.gradle.kts | ||
|
|
||
| - name: Build SDK | ||
| run: | | ||
| ./gradlew assemble --parallel | ||
|
|
||
| - name: Test sentry-samples-spring-boot | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-webflux | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-webflux" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-opentelemetry agent init true | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-opentelemetry" \ | ||
| --agent true \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-opentelemetry agent init false | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-opentelemetry" \ | ||
| --agent true \ | ||
| --auto-init "false" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-opentelemetry-noagent | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-opentelemetry-noagent" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
adinauer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-results-springboot-2-${{ matrix.springboot-version }} | ||
| path: | | ||
| **/build/reports/* | ||
| **/build/test-results/**/*.xml | ||
| sentry-mock-server.txt | ||
| spring-server.txt | ||
|
|
||
| - name: Test Report | ||
| uses: phoenix-actions/test-reporting@f957cd93fc2d848d556fa0d03c57bc79127b6b5e # pin@v15 | ||
| if: always() | ||
| with: | ||
| name: JUnit Spring Boot 2.x ${{ matrix.springboot-version }} | ||
| path: | | ||
| **/build/test-results/**/*.xml | ||
| reporter: java-junit | ||
| output-to: step-summary | ||
| fail-on-error: false | ||
|
|
||
| - name: Upload test results to Codecov | ||
| if: ${{ !cancelled() }} | ||
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| file: '**/build/test-results/**/*.xml' | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| name: Spring Boot 3.x Matrix | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - '**/sentry-android/**' | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| spring-boot-3-matrix: | ||
| timeout-minutes: 45 | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| springboot-version: [ '3.0.0', '3.2.10', '3.3.5', '3.4.5', '3.5.6' ] | ||
lcian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| name: Spring Boot ${{ matrix.springboot-version }} | ||
| env: | ||
| SENTRY_URL: http://127.0.0.1:8000 | ||
| GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
|
|
||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.10.5' | ||
|
|
||
| - name: Install Python dependencies | ||
| run: | | ||
| python3 -m pip install --upgrade pip | ||
| python3 -m pip install -r requirements.txt | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| # Workaround for https://github.com/gradle/actions/issues/21 to use config cache | ||
| - name: Cache buildSrc | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: buildSrc/build | ||
| key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }} | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a | ||
| with: | ||
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
|
|
||
| - name: Update Spring Boot 3.x version | ||
| run: | | ||
| sed -i 's/^springboot3=.*/springboot3=${{ matrix.springboot-version }}/' gradle/libs.versions.toml | ||
| echo "Updated Spring Boot 3.x version to ${{ matrix.springboot-version }}" | ||
|
|
||
| - name: Exclude android modules from build | ||
| run: | | ||
| sed -i \ | ||
| -e '/.*"sentry-android-ndk",/d' \ | ||
| -e '/.*"sentry-android",/d' \ | ||
| -e '/.*"sentry-compose",/d' \ | ||
| -e '/.*"sentry-android-core",/d' \ | ||
| -e '/.*"sentry-android-fragment",/d' \ | ||
| -e '/.*"sentry-android-navigation",/d' \ | ||
| -e '/.*"sentry-android-sqlite",/d' \ | ||
| -e '/.*"sentry-android-timber",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android-benchmark",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:sentry-uitest-android-critical",/d' \ | ||
| -e '/.*"sentry-android-integration-tests:test-app-sentry",/d' \ | ||
| -e '/.*"sentry-samples:sentry-samples-android",/d' \ | ||
| -e '/.*"sentry-android-replay",/d' \ | ||
| settings.gradle.kts | ||
|
|
||
| - name: Exclude android modules from ignore list | ||
| run: | | ||
| sed -i \ | ||
| -e '/.*"sentry-uitest-android",/d' \ | ||
| -e '/.*"sentry-uitest-android-benchmark",/d' \ | ||
| -e '/.*"sentry-uitest-android-critical",/d' \ | ||
| -e '/.*"test-app-sentry",/d' \ | ||
| -e '/.*"sentry-samples-android",/d' \ | ||
| build.gradle.kts | ||
|
|
||
| - name: Build SDK | ||
| run: | | ||
| ./gradlew assemble --parallel | ||
|
|
||
| - name: Test sentry-samples-spring-boot-jakarta | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-jakarta" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-webflux-jakarta | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-webflux-jakarta" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-jakarta-opentelemetry agent init true | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-jakarta-opentelemetry" \ | ||
| --agent true \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-jakarta-opentelemetry agent init false | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-jakarta-opentelemetry" \ | ||
| --agent true \ | ||
| --auto-init "false" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-boot-jakarta-opentelemetry-noagent | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-boot-jakarta-opentelemetry-noagent" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Test sentry-samples-spring-jakarta | ||
| run: | | ||
| python3 test/system-test-runner.py test \ | ||
| --module "sentry-samples-spring-jakarta" \ | ||
| --agent false \ | ||
| --auto-init "true" \ | ||
| --build "true" | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-results-springboot-3-${{ matrix.springboot-version }} | ||
| path: | | ||
| **/build/reports/* | ||
| **/build/test-results/**/*.xml | ||
| sentry-mock-server.txt | ||
| spring-server.txt | ||
|
|
||
| - name: Test Report | ||
| uses: phoenix-actions/test-reporting@f957cd93fc2d848d556fa0d03c57bc79127b6b5e # pin@v15 | ||
| if: always() | ||
| with: | ||
| name: JUnit Spring Boot 3.x ${{ matrix.springboot-version }} | ||
| path: | | ||
| **/build/test-results/**/*.xml | ||
| reporter: java-junit | ||
| output-to: step-summary | ||
| fail-on-error: false | ||
|
|
||
| - name: Upload test results to Codecov | ||
| if: ${{ !cancelled() }} | ||
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| file: '**/build/test-results/**/*.xml' | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.