Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: plugin verifier matrix #214

Merged
merged 8 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading