This is an automated email from the ASF dual-hosted git repository. jdaugherty pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/grails-intellij-plugin.git
commit 9820c33c9ca6b6b11452300e77e8c8901b6a2afb Author: James Daugherty <[email protected]> AuthorDate: Sat Jul 18 15:33:22 2026 -0400 Add CI workflows for build, verification, and RAT --- .github/workflows/gradle.yml | 72 ++++++++++++++++++++++++++++++++++++++++++++ .github/workflows/rat.yml | 57 +++++++++++++++++++++++++++++++++++ build.gradle.kts | 12 +++++++- 3 files changed, 140 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..a3b9fe9 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,72 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "CI" +on: + push: + branches: + - main + pull_request: + workflow_dispatch: +# Queue jobs - cancel in-progress PR runs when new commits are pushed, but allow branch builds to complete +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} +jobs: + build: + name: 'Build & Test' + runs-on: ubuntu-latest + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: "☕️ Setup JDK" + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 + with: + distribution: liberica + java-version: 21 + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 + with: + cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + - name: "🏗️ Build & Test" + run: ./gradlew check buildPlugin + - name: "📦 Upload plugin ZIP" + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: plugin-zip + path: build/distributions/*.zip + verify: + name: 'Plugin Verifier' + runs-on: ubuntu-latest + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: "☕️ Setup JDK" + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 + with: + distribution: liberica + java-version: 21 + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 + with: + cache-provider: basic # see note above + - name: "🔎 IntelliJ Plugin Verifier" + run: ./gradlew verifyPlugin + - name: "📋 Upload verifier report" + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: plugin-verifier-report + path: build/reports/pluginVerifier diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml new file mode 100644 index 0000000..ea10e8c --- /dev/null +++ b/.github/workflows/rat.yml @@ -0,0 +1,57 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "Licensing - RAT Report" +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: +# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} +jobs: + rat-audit: + runs-on: ubuntu-latest + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: "☕️ Setup JDK" + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 + with: + distribution: liberica + java-version: 21 + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 + with: + cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + - name: "🧐 Apache License - Release Audit Tool" + run: ./gradlew rat + - name: Upload RAT HTML report + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: rat-report + path: build/reports/rat/index.html + - name: Publish RAT report in Job Summary + if: always() + run: | + echo "## 📋 Apache RAT Report" >> $GITHUB_STEP_SUMMARY + # inject raw HTML (it will render as HTML in the summary) + sed -n '/<body[^>]*>/,/<\/body>/ { /<h3>Archives:<\/h3>/,/<\/body>/d; /<body[^>]*>/d; /<\/body>/d; s/^[[:space:]]*//; p; }' build/reports/rat/index.html >> $GITHUB_STEP_SUMMARY diff --git a/build.gradle.kts b/build.gradle.kts index 915e15f..f2ecc9a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -122,6 +122,12 @@ intellijPlatform { changeNotes = "" } + + pluginVerification { + ides { + recommended() + } + } } tasks { @@ -131,7 +137,11 @@ tasks { } test { - systemProperty("idea.home.path", properties("test.idea.home.path")) + // local override for tests that need IDE sources; unset/nonexistent on CI + val ideaHome = project.findProperty("test.idea.home.path")?.toString() + if (ideaHome != null && file(ideaHome).exists()) { + systemProperty("idea.home.path", ideaHome) + } } // ASF policy: ship LICENSE and NOTICE inside the plugin jar
