-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for Spring Boot 3. (#10)
* Added support for Spring Boot 3.
- Loading branch information
Showing
43 changed files
with
288 additions
and
126 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -9,48 +9,114 @@ on: | |
- master | ||
|
||
jobs: | ||
build: | ||
name: "Build and Test" | ||
matrix_build: | ||
name: "Matrix Build" | ||
runs-on: | ||
- ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 100 | ||
matrix: | ||
spring_boot_version: | ||
- 3.0.6 | ||
- 2.7.11 | ||
- 2.6.14 | ||
env: | ||
SPRING_BOOT_VERSION: ${{ matrix.spring_boot_version }} | ||
GRADLE_OPTS: "-Djava.security.egd=file:/dev/./urandom -Dorg.gradle.parallel=true" | ||
IN_CI: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: "Retrieve gradle settings" | ||
uses: actions/cache@v2 | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
path: | | ||
~/.gradle | ||
key: gradle-v1-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', '**/*.gradle*') }} | ||
gradle-home-cache-cleanup: true | ||
# Comment out when you are upgrading gradle in a branch and doing tons of commits you would need to test. | ||
# cache-read-only: false | ||
- name: "Assemble jar" | ||
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew assemble --console=plain --no-daemon | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: assemble --console=plain --info --stacktrace --parallel | ||
- name: "Compile tests" | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: compileTestJava compileTestGroovy --console=plain --info --stacktrace --parallel | ||
- name: "Run checks" | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: check -x test --console=plain --stacktrace | ||
- name: "Run tests" | ||
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew -Dspring.profiles.include=continuous-integration check --console=plain --no-daemon --stacktrace | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: test --console=plain --info --stacktrace | ||
- name: "Test if publishing works" | ||
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew publishToMavenLocal --console=plain --no-daemon --stacktrace | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publishToMavenLocal --console=plain --info --stacktrace | ||
- name: "Publish Test Report" | ||
uses: mikepenz/action-junit-report@v2 | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
check_name: Test Report-(${{ matrix.spring_boot_version }}) | ||
report_paths: '**/build/test-results/**/*.xml' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
require_tests: true | ||
- name: Publish checkstyle report | ||
if: failure() | ||
if: always() | ||
uses: jwgmeligmeyling/checkstyle-github-action@master | ||
with: | ||
name: Checkstyle Report-(${{ matrix.spring_boot_version }}) | ||
path: '**/build/reports/**/*.xml' | ||
- name: Publish spotbugs report | ||
if: failure() | ||
uses: jwgmeligmeyling/spotbugs-github-action@master | ||
with: | ||
name: Spotbugs Report-(${{ matrix.spring_boot_version }}) | ||
path: '**/build/reports/**/*.xml' | ||
- name: "Bootstrap git config" | ||
if: github.ref == 'refs/heads/master' | ||
- name: "Collect test reports" | ||
run: | | ||
mkdir -p ~/.ssh | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
git config --global user.name "TW GitHub Actions" && git config --global user.email [email protected] | ||
tar -zcvf all-test-reports-${{ matrix.spring_boot_version }}.tar.gz **/build/reports | ||
if: always() | ||
- name: "Store test results" | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: all-test-reports-${{ matrix.spring_boot_version }} | ||
path: all-test-reports-${{ matrix.spring_boot_version }}.tar.gz | ||
retention-days: 7 | ||
build: | ||
name: "Build and Test" | ||
runs-on: | ||
- ubuntu-latest | ||
needs: matrix_build | ||
container: | ||
image: azul/zulu-openjdk:17 | ||
steps: | ||
# Needed hacks to properly fail the build when one matrix build fails. | ||
- name: Do something so that GHA is happy | ||
run: echo "Be happy!" | ||
- name: Verify matrix jobs succeeded | ||
if: ${{ needs.matrix_build.result != 'success' }} | ||
run: exit 1 | ||
- name: "Install packages" | ||
run: apt-get update && apt-get install -y git unzip | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
# Comment out when you are upgrading gradle in a branch and doing tons of commits you would need to test. | ||
# cache-read-only: false | ||
- name: "Tag release" | ||
if: github.ref == 'refs/heads/master' | ||
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew tagRelease --console=plain --no-daemon | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: tagRelease --console=plain --info --stacktrace | ||
|
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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,29 @@ | ||
ext { | ||
springBootVersion = "${System.getenv("SPRING_BOOT_VERSION") ?: '2.6.14'}" | ||
|
||
libraries = [ | ||
// version defined | ||
awaitility : 'org.awaitility:awaitility:4.2.0', | ||
spotbugsAnnotations : "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}", | ||
spockSpring : 'org.spockframework:spock-spring:2.4-M1-groovy-4.0', | ||
|
||
springBootDependencies : "org.springframework.boot:spring-boot-dependencies:${springBootVersion}", | ||
twGracefulShutdown : 'com.transferwise.common:tw-graceful-shutdown:2.11.0', | ||
twGracefulShutdownInterfaces : 'com.transferwise.common:tw-graceful-shutdown-interfaces:2.11.0', | ||
twBaseUtils : 'com.transferwise.common:tw-base-utils:1.10.1', | ||
|
||
// versions managed by spring-boot-dependencies platform | ||
commonsLang3 : 'org.apache.commons:commons-lang3', | ||
jacksonAnnotations : 'com.fasterxml.jackson.core:jackson-annotations', | ||
jacksonDatabind : 'com.fasterxml.jackson.core:jackson-databind', | ||
lombok : 'org.projectlombok:lombok', | ||
slf4jApi : 'org.slf4j:slf4j-api', | ||
springBootActuator : 'org.springframework.boot:spring-boot-actuator', | ||
springBootAutoConfigure : 'org.springframework.boot:spring-boot-autoconfigure', | ||
springBootConfigurationProcessor: 'org.springframework.boot:spring-boot-configuration-processor', | ||
springBootStarterActuator : 'org.springframework.boot:spring-boot-starter-actuator', | ||
springBootStarterTest : 'org.springframework.boot:spring-boot-starter-test', | ||
springBootStarterWeb : 'org.springframework.boot:spring-boot-starter-web', | ||
springWeb : 'org.springframework:spring-web', | ||
] | ||
} |
This file contains 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 file contains 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 file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
version=1.1.1 | ||
version=1.2.0 |
Binary file not shown.
Oops, something went wrong.