From 33b28ad5e761834a0173b2ff37da9c01e32edc9b Mon Sep 17 00:00:00 2001 From: marcin Date: Thu, 12 Dec 2024 14:17:54 +0000 Subject: [PATCH] chore: plugin verifier matrix (#214) * plugin verifier matrix --- .github/workflows/validation.yml | 31 +++++++++++++++++++++---------- build.gradle.kts | 14 +++++++++++--- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index d47b8f1..49360cd 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -53,6 +53,9 @@ jobs: runPluginVerifier: runs-on: ubuntu-latest needs: codeChecks + strategy: + matrix: + version: [ "2023.3", "2024.3" ] steps: - uses: actions/checkout@v4 - name: Set up JDK 21 @@ -62,28 +65,33 @@ jobs: distribution: 'temurin' cache: gradle - name: Verify plugin - run: ./gradlew --no-configuration-cache verifyPlugin - - name: Get result directories - run: | - DIRECTORIES=$(ls build/reports/pluginVerifier/ | jq -R -s -c 'split("\n")[:-1]') - echo "DIRECTORIES=$DIRECTORIES" >> $GITHUB_ENV + run: ./gradlew --no-configuration-cache -PverifyVersion=${{ matrix.version }} verifyPlugin - uses: actions/upload-artifact@v4 with: - name: pluginVerifierReports + name: pluginVerifierReports-${{ matrix.version }} path: build/reports/pluginVerifier + + waitForResults: + runs-on: ubuntu-latest + needs: runPluginVerifier + steps: + - uses: actions/download-artifact@v4 + - name: Get result directories + run: | + DIRECTORIES=$(find . -name 'I*' | jq -R -s -c 'split("\n")[:-1]') + echo "DIRECTORIES=$DIRECTORIES" >> $GITHUB_ENV outputs: directories: ${{ env.DIRECTORIES }} addComments: runs-on: ubuntu-latest - needs: runPluginVerifier + needs: waitForResults strategy: matrix: - dir: ${{fromJson(needs.runPluginVerifier.outputs.directories)}} + dir: ${{fromJson(needs.waitForResults.outputs.directories)}} steps: - uses: actions/download-artifact@v4 - with: - name: pluginVerifierReports + - run: ls - name: Publish report uses: mshick/add-pr-comment@v2 with: @@ -91,3 +99,6 @@ jobs: refresh-message-position: true message-path: | ${{ matrix.dir }}/report.md + - uses: int128/hide-comment-action@v1 + with: + contains: "Compatible." diff --git a/build.gradle.kts b/build.gradle.kts index ae7cf48..44bdd68 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,9 +11,17 @@ plugins { id("com.adarshr.test-logger") version "4.0.0" } -// version for building and verifying plugin +// version for building plugin val buildVersion = "2023.3" +// version for verifying plugin, check validation.yml +val verifyVersion = + if (hasProperty("verifyVersion")) { + property("verifyVersion") as String + } else { + buildVersion + } + group = "com.vaadin" val publishChannel = @@ -66,8 +74,8 @@ intellijPlatform { } pluginVerification { ides { - ide(IntelliJPlatformType.IntellijIdeaCommunity, buildVersion) - ide(IntelliJPlatformType.IntellijIdeaUltimate, buildVersion) + ide(IntelliJPlatformType.IntellijIdeaCommunity, verifyVersion) + ide(IntelliJPlatformType.IntellijIdeaUltimate, verifyVersion) } verificationReportsFormats = listOf(VerifyPluginTask.VerificationReportsFormats.MARKDOWN) }