From 7c7809ddb1274c00730319474a5f8a019de6d17d Mon Sep 17 00:00:00 2001 From: Stefano Cordio Date: Sun, 21 Jan 2024 18:37:35 +0100 Subject: [PATCH] Add integration tests with Spring Boot --- .github/workflows/integration-tests.yml | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/integration-tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 00000000000..5b0e19e63c0 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,61 @@ +name: Integration Tests + +on: [push, pull_request] + +env: + MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always + +jobs: + + spring-boot: + + name: Verify with Spring Boot + runs-on: ubuntu-latest + + steps: + - name: Checkout AssertJ + uses: actions/checkout@v4 + with: + path: assertj + - name: Set up Java 21 with Maven cache + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '21' + cache: 'maven' + cache-dependency-path: 'assertj/pom.xml' + - name: Set AssertJ version + run: assertj/mvnw $MAVEN_ARGS -f assertj/pom.xml versions:set -DnewVersion=0.0.0 + - name: Install AssertJ + run: assertj/mvnw $MAVEN_ARGS -f assertj/pom.xml install -DskipTests + + - name: Checkout Spring Boot + uses: actions/checkout@v4 + with: + repository: spring-projects/spring-boot + path: spring-boot + - name: Set up Java 17 with Gradle cache + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + cache: 'gradle' + cache-dependency-path: | + spring-boot/*.gradle* + spring-boot/**/gradle-wrapper.properties + - name: Create init.gradle + run: | + tee -a spring-boot/init.gradle << END + allprojects { + repositories { + mavenLocal() + } + } + END + - name: Test Spring Boot + run: > + spring-boot/gradlew --no-daemon + --project-dir spring-boot + --init-script spring-boot/init.gradle + --project-prop assertjVersion=0.0.0 + build