Skip to content

Add CI (build :core + :plugin, run parser tests on push) #1

Closed

Description

@GabrielBBaldez

The plugin has no CI — nothing builds or runs the parser tests on push.

The build is already CI-ready. In plugin/build.gradle.kts:

val localIde = providers.gradleProperty("localIdePath").orNull
if (localIde != null) local(localIde) else intellijIdeaCommunity("2024.3.5")

So when -PlocalIdePath is not passed (the CI case), Gradle downloads IntelliJ IDEA Community on its own. A workflow just runs the build without that property.

What to do

Add .github/workflows/ci.yml:

  • actions/checkout@v4
  • actions/setup-java@v4 with Temurin 21
  • gradle/actions/setup-gradle@v4 (gives Gradle caching)
  • run ./gradlew build — compiles :core + :plugin, runs the :core parser tests, and buildPlugin packages the zip. Do not pass -PlocalIdePath in CI.
  • add ./gradlew verifyPlugin if you want the plugin-structure check too.

Cache the IntelliJ Platform download as well (the IDE artifact is ~1 GB); setup-gradle caches ~/.gradle, and the platform cache lives there too, so cold runs are slow but warm runs are fast.

Trigger on push (main) and pull_request.

How to verify

The first run is green and does the IDE download; a follow-up push reuses the cache. A red build should block the change.

Activity

  1. GabrielBBaldez commented on Aug 2, 2026

    @GabrielBBaldez
    MemberAuthor

    Done in #13 — merged and green.

    Two jobs: build runs :core:test plus build/verifyPluginProjectConfiguration/verifyPluginStructure/buildPlugin and uploads the zip; verify runs the IntelliJ Plugin Verifier against 2024.2.5 (the floor sinceBuild = 242 claims) and 2024.3.5 (the compile target). Both report Compatible.

    Worth recording what the first run turned up, since it had been true for the life of the repo: gradlew was committed 100644, so every Linux runner failed it with exit 126. Nothing caught it because every build until now was on Windows, where the mode bit isn't consulted. Fixed to 100755 in the same PR.

    The verify job also asserts that the number of Plugin Verifier report directories equals the number of IDEs declared in pluginVerification. That guard exists because ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.2.5") compiles, runs, and schedules nothing — leaving a green run that verified one IDE while appearing to verify two. Only the ide("IC-2024.2.5") string form works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededinfraBuild, CI, release, tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions