diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2c0f11b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# Keeps the Gradle plugins/dependencies and the GitHub Actions up to date. +# https://docs.github.com/code-security/dependabot/dependabot-version-updates +version: 2 +updates: + - package-ecosystem: gradle + directory: / + schedule: + interval: monthly + open-pull-requests-limit: 5 + + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + open-pull-requests-limit: 5 diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index a0e8cd4..1d3fb36 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -14,7 +14,7 @@ jobs: steps: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # Source branch ref: ${{ github.head_ref }} @@ -31,12 +31,18 @@ jobs: sed -i "/pluginVersion = / s/ = .*/ = $VERSION_WITH_BUILDNUMBER/" gradle.properties echo "Version: $VERSION_WITH_BUILDNUMBER" - # Setup Java 11 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + gradle-home-cache-cleanup: true # Publish the plugin to the Marketplace, this should automatically use the 'beta' channel because we changed the # version in gradle.properties to version-beta diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c640af..7e8c9ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,6 @@ jobs: outputs: version: ${{ steps.properties.outputs.version }} changelog: ${{ steps.properties.outputs.changelog }} - pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} steps: # Free GitHub Actions Environment Disk Space @@ -49,12 +48,12 @@ jobs: - name: Gradle Wrapper Validation uses: gradle/wrapper-validation-action@v2 - # Setup Java 11 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 # Setup Gradle - name: Setup Gradle @@ -74,12 +73,10 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "name=$NAME" >> $GITHUB_OUTPUT - echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT echo "changelog<> $GITHUB_OUTPUT echo "$CHANGELOG" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier # Build plugin - name: Build plugin @@ -118,7 +115,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 # Setup Gradle - name: Setup Gradle @@ -138,12 +135,6 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests - # Upload the Kover report to CodeCov - - name: Upload Code Coverage Report - uses: codecov/codecov-action@v4 - with: - files: ${{ github.workspace }}/build/reports/kover/report.xml - # Run Qodana inspections and provide report inspectCode: name: Inspect code @@ -179,7 +170,13 @@ jobs: with: cache-default-branch-only: true - # Run plugin structure verification along with IntelliJ Plugin Verifier + # Run the plugin structure verification and the IntelliJ Plugin Verifier. Note the task names, + # they were swapped by the move to the IntelliJ Platform Gradle Plugin 2.x: + # verifyPluginStructure - validates the plugin.xml descriptors and the archive structure + # (this was called verifyPlugin with the 1.x plugin) + # verifyPlugin - the IntelliJ Plugin Verifier, checks binary compatibility against + # the IDE build pinned in gradle.properties (pluginVerifierIdeVersions) + # (this was called runPluginVerifier with the 1.x plugin) verify: name: Verify plugin needs: [ build ] @@ -202,7 +199,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 # Setup Gradle - name: Setup Gradle @@ -210,16 +207,12 @@ jobs: with: gradle-home-cache-cleanup: true - # Cache Plugin Verifier IDEs - - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v4 - with: - path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides - key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} - - # Run Verify Plugin task and IntelliJ Plugin Verifier tool + # No dedicated IDE cache: the 2.x plugin resolves the verified IDE as a regular Gradle + # dependency, so it lands in the Gradle cache that setup-gradle already handles. One IDE is + # roughly 4 GB, so keep pluginVerifierIdeVersions short - GitHub allows 10 GB of caches per + # repository in total. - name: Run Plugin Verification tasks - run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} + run: ./gradlew verifyPluginStructure verifyPlugin # Collect Plugin Verifier Result - name: Collect Plugin Verifier Result diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c39feeb..7749d06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,16 +20,22 @@ jobs: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.release.tag_name }} - # Setup Java 11 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + gradle-home-cache-cleanup: true # Publish the plugin to the Marketplace - name: Publish Plugin diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml index 363d9e8..24aed78 100644 --- a/.github/workflows/run-ui-tests.yml +++ b/.github/workflows/run-ui-tests.yml @@ -1,9 +1,15 @@ -# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps: -# - prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with UI -# - wait for IDE to start -# - run UI tests with separate Gradle task +# GitHub Actions Workflow for running the UI tests against a real IDE. # -# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform +# UI tests are driven by the IntelliJ Starter framework through the `testIdeUi` task of the +# IntelliJ Platform Gradle Plugin 2.x. The test code starts and drives the IDE itself, so unlike +# the old runIdeForUiTests setup there is no separate "start the IDE and wait for the robot server" +# dance - the task is all that has to run. +# +# Note: there are no UI tests in the project yet, so the task currently runs an empty suite. The +# workflow exists so that adding the first test under src/test is enough to get it covered here. +# +# Please check https://plugins.jetbrains.com/docs/intellij/testing-plugins.html for information +# about testing plugins. # # Workflow is triggered manually. @@ -14,46 +20,58 @@ on: jobs: testUI: + name: Run UI Tests runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: + # A real IDE needs a display, which a Linux runner does not have - os: ubuntu-latest - runIde: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x16 & - gradle runIdeForUiTests & + uiTests: xvfb-run --auto-servernum ./gradlew testIdeUi - os: windows-latest - runIde: start gradlew.bat runIdeForUiTests + uiTests: ./gradlew testIdeUi - os: macos-latest - runIde: ./gradlew runIdeForUiTests & + uiTests: ./gradlew testIdeUi steps: + # Free GitHub Actions Environment Disk Space, an IDE download needs several GB + - name: Maximize Build Space + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + large-packages: false + # Check out current repository - name: Fetch Sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - # Setup Java 11 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu - java-version: 11 + java-version: 21 - # Run IDEA prepared for UI testing - - name: Run IDE - run: ${{ matrix.runIde }} - - # Wait for IDEA to be started - - name: Health Check - uses: jtalk/url-health-check-action@v3 + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 with: - url: http://127.0.0.1:8082 - max-attempts: 15 - retry-delay: 30s + gradle-home-cache-cleanup: true + + # Run the UI tests + - name: Run UI Tests + run: ${{ matrix.uiTests }} - # Run tests - - name: Tests - run: ./gradlew test + # Collect the results of failed tests, including the IDE logs and screenshots the Starter + # framework writes for a failed run + - name: Collect UI Test Results + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: ui-test-results-${{ matrix.os }} + path: | + ${{ github.workspace }}/build/reports/tests + ${{ github.workspace }}/build/idea-ide-starter diff --git a/.gitignore b/.gitignore index 737ffc1..e2a836f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,20 @@ .gradle .qodana +.intellijPlatform build +### Local only ### +# Environment files with local tokens/secrets +.env +.env.* +# Local review/planning notes +IMPROVEMENTS.md +improvements_offen.md +idea.log +# AI assistant working directories +.claude/ +.aider* + !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ @@ -11,6 +24,8 @@ build *.iml *.ipr out/ +# The IDE rewrites these on every version change, so they are not tracked +.idea/ !**/src/main/**/out/ !**/src/test/**/out/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 15e6830..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 5e1b002..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index d8e9561..0000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 611e7c8..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/icon.svg b/.idea/icon.svg deleted file mode 100644 index 288f661..0000000 --- a/.idea/icon.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index fdc392f..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 24fff94..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/resourceBundles.xml b/.idea/resourceBundles.xml deleted file mode 100644 index 3123738..0000000 --- a/.idea/resourceBundles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - SettingsBundle - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index 2b63946..0000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.run/Run Plugin Verification.run.xml b/.run/Run Plugin Verification.run.xml index 3a8d688..cab5204 100644 --- a/.run/Run Plugin Verification.run.xml +++ b/.run/Run Plugin Verification.run.xml @@ -11,7 +11,8 @@