Skip to content

Commit

Permalink
chore: plugin verifier matrix (#214)
Browse files Browse the repository at this point in the history
* plugin verifier matrix
  • Loading branch information
MarcinVaadin authored Dec 12, 2024
1 parent 1b70d5a commit 33b28ad
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -62,32 +65,40 @@ 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:
message-id: verify-plugin-comment-${{ matrix.dir }}
refresh-message-position: true
message-path: |
${{ matrix.dir }}/report.md
- uses: int128/hide-comment-action@v1
with:
contains: "Compatible."
14 changes: 11 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 33b28ad

Please sign in to comment.