From 1a802eb572a56698aa712451bcf84e15e3a5ef46 Mon Sep 17 00:00:00 2001 From: tschuehly Date: Thu, 2 Nov 2023 20:04:01 +0100 Subject: [PATCH] parallel ci --- .github/workflows/release.yml | 69 ++++++++++++++++--- examples/jte-example/settings.gradle.kts | 30 ++++---- examples/kte-example/settings.gradle.kts | 30 ++++---- .../settings.gradle.kts | 30 ++++---- .../settings.gradle.kts | 30 ++++---- 5 files changed, 120 insertions(+), 69 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 928d922..0697ee4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: pull_request: branches: [ main ] jobs: - test: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -13,27 +13,61 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: 'gradle' - name: make gradle executable run: chmod +x ./gradlew - name: publishToMavenLocal run: ./gradlew :core:publishToMavenLocal :thymeleaf:publishToMavenLocal :jte:publishToMavenLocal :jte-compiler:publishToMavenLocal + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + test-thymeleaf-kotlin: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' - name: run thymeleaf kotlin tests run: | cd ./examples/thymeleaf-kotlin-example chmod +x ./gradlew ./gradlew test + test-thymeleaf-java: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' - name: run thymeleaf java tests run: | cd ./examples/thymeleaf-java-example chmod +x ./mvnw ./mvnw test - chmod +x ./mvnw - ./mvnw test - - name: run kte kotlin tests - run: | - cd ./examples/kte-example - chmod +x ./gradlew - ./gradlew test + test-jte: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' - name: run jte java tests run: | cd ./examples/jte-example @@ -41,8 +75,24 @@ jobs: ./gradlew test chmod +x ./mvnw ./mvnw test + test-kte: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + - name: run kte kotlin tests + run: | + cd ./examples/kte-example + chmod +x ./gradlew + ./gradlew test publish: - needs: test + needs: [test-jte,test-kte, test-thymeleaf-kotlin,test-thymeleaf-java] if: github.ref_type == 'tag' || contains(github.ref_name, 'SNAPSHOT') runs-on: ubuntu-latest steps: @@ -52,6 +102,7 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: 'gradle' - name: Run chmod to make gradlew executable run: chmod +x ./gradlew - name: Publish thymeleaf package to staging diff --git a/examples/jte-example/settings.gradle.kts b/examples/jte-example/settings.gradle.kts index 214729c..c046dbf 100644 --- a/examples/jte-example/settings.gradle.kts +++ b/examples/jte-example/settings.gradle.kts @@ -1,16 +1,16 @@ rootProject.name = "jte-example" -includeBuild("..\\..\\jte\\jte"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte")).using(project(":")) - } -} -includeBuild("..\\..\\jte\\jte-compiler"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) - } -} -includeBuild("..\\..\\core"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) - } -} \ No newline at end of file +//includeBuild("..\\..\\jte\\jte"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte")).using(project(":")) +// } +//} +//includeBuild("..\\..\\jte\\jte-compiler"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) +// } +//} +//includeBuild("..\\..\\core"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) +// } +//} \ No newline at end of file diff --git a/examples/kte-example/settings.gradle.kts b/examples/kte-example/settings.gradle.kts index 1347caa..cf2dd9f 100644 --- a/examples/kte-example/settings.gradle.kts +++ b/examples/kte-example/settings.gradle.kts @@ -1,17 +1,17 @@ rootProject.name = "kte-example" -includeBuild("..\\..\\jte\\jte"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte")).using(project(":")) - } -} -includeBuild("..\\..\\jte\\jte-compiler"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) - } -} -includeBuild("..\\..\\core"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) - } -} \ No newline at end of file +//includeBuild("..\\..\\jte\\jte"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte")).using(project(":")) +// } +//} +//includeBuild("..\\..\\jte\\jte-compiler"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) +// } +//} +//includeBuild("..\\..\\core"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) +// } +//} \ No newline at end of file diff --git a/examples/thymeleaf-java-example/settings.gradle.kts b/examples/thymeleaf-java-example/settings.gradle.kts index 8830fce..aeb622d 100644 --- a/examples/thymeleaf-java-example/settings.gradle.kts +++ b/examples/thymeleaf-java-example/settings.gradle.kts @@ -1,16 +1,16 @@ rootProject.name = "thymeleaf-java-example" -includeBuild("..\\..\\thymeleaf"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-thymeleaf")).using(project(":")) - } -} -includeBuild("..\\..\\core"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) - } -} -includeBuild("..\\..\\jte\\jte-compiler"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) - } -} \ No newline at end of file +//includeBuild("..\\..\\thymeleaf"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-thymeleaf")).using(project(":")) +// } +//} +//includeBuild("..\\..\\core"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) +// } +//} +//includeBuild("..\\..\\jte\\jte-compiler"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) +// } +//} \ No newline at end of file diff --git a/examples/thymeleaf-kotlin-example/settings.gradle.kts b/examples/thymeleaf-kotlin-example/settings.gradle.kts index 8c57761..898a435 100644 --- a/examples/thymeleaf-kotlin-example/settings.gradle.kts +++ b/examples/thymeleaf-kotlin-example/settings.gradle.kts @@ -1,17 +1,17 @@ rootProject.name = "thymeleaf-kotlin-example" -includeBuild("..\\..\\thymeleaf"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-thymeleaf")).using(project(":")) - } -} -includeBuild("..\\..\\core"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) - } -} -includeBuild("..\\..\\jte\\jte-compiler"){ - dependencySubstitution { - substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) - } -} \ No newline at end of file +//includeBuild("..\\..\\thymeleaf"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-thymeleaf")).using(project(":")) +// } +//} +//includeBuild("..\\..\\core"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-core")).using(project(":")) +// } +//} +//includeBuild("..\\..\\jte\\jte-compiler"){ +// dependencySubstitution { +// substitute(module("de.tschuehly:spring-view-component-jte-compiler")).using(project(":")) +// } +//} \ No newline at end of file