Repository navigation
Backlog
Labels
Milestone
Description
Ways to make the build and the tests faster, locally and on CI, with what each would gain and risk. Measured on CI run 45687900451 on main (2026-11-25) and the build as of 0a8a114.
Today
| CI jobs | 5 Test jobs: Linux 2024.2 (10 min, of which test 8.5), Linux 2025.3 (11), Linux IU 2026.3 (12), Windows (9), macOS (15). In 490 runs from 2026-11-11 to 11-25, the test step took up to 23 min on macOS. Plus Build Plugin zip and the plugin verifier, each with its own setup and compilation |
| Tests | ~2,500, one class after another in one test JVM per test task (no maxParallelForks, no JUnit parallel execution) |
| Configuration cache | On (gradle.properties). Locally it's reused. On CI it isn't: every job logs "Not saving configuration-cache state, as no encryption key was provided" |
| Build cache | On. CI restores e.g. compileJava, compileKotlin, buildSearchableOptions FROM-CACHE |
| Task parallelism | org.gradle.parallel is off, but LSP4IJ is a single project, so it would change nothing. With the configuration cache, Gradle already runs independent tasks of one project in parallel: in the IU job, test and testJavaScript overlap |
| Coverage | Two tools: Kover (kover { reports { total { xml { onCheck = true } } } }) and JaCoCo (the jacoco plugin, with check depending on jacocoTestReport). Both instrument the test JVMs of all 5 jobs. Codecov uploads only Kover's report.xml, and only from the Linux 2024.2 job |
Options
| # | Change | Gain | Risk |
|---|---|---|---|
| 1 | Drop JaCoCo. Nothing uploads its reports. Kover is what Codecov gets | Unmeasured. JaCoCo's agent instruments, by default, every class the test JVM loads, IntelliJ's included, so likely noticeable on every job | Low. Only the local build/reports/jacoco goes away. Check that nothing else reads it |
| 2 | Coverage only in the job that uploads it, e.g. Kover enabled by a property set only in the Linux 2024.2 job | The coverage agent's overhead in 4 of the 5 jobs | Low. The other jobs no longer produce a coverage report, which nobody uploads anyway |
| 3 | Shard the tests across CI jobs, e.g. com.redhat.devtools.lsp4ij.dap.* in a job of its own per platform, through a test filter property |
Roughly halves the test step's wall time per platform; costs ~1–2 runner minutes of setup per extra job | Low to medium. Each shard has its own JVM, which reduces coupling between tests. A test that only passes after another one could show up. Checks and required status names change |
| 4 | Configuration cache on CI: cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} for gradle/actions/setup-gradle |
Seconds per job (the task graph isn't calculated again) | Low, but needs a repository secret. Only helps pushes to main: PRs from forks don't get secrets |
| 5 | Skip searchable options in the Test jobs (buildSearchableOptions starts an IDE when it isn't FROM-CACHE; check builds the plugin) |
Minutes when the cache misses, as after a change to settings or plugin.xml; nothing otherwise |
Low for the Test jobs. Keep them in Build Plugin zip and releases |
| 6 | Forked test JVMs (maxParallelForks = 2) |
Potentially the largest: the test step is most of each job | High. All forks would share the test sandbox (IntelliJ's system and config directories, indexes, locks), files under the user's home (installer tests), and any fixed ports. Each IntelliJ test JVM needs ~1.5–2 GB; Linux runners have 4 vCPUs and 16 GB, macOS runners 3 vCPUs. Needs a sandbox per fork, which the IntelliJ Platform Gradle Plugin configures per test task, not per fork. Process-wide singletons such as MockLanguageServer.INSTANCE are per JVM, so they are fine |
| 7 | JUnit parallel execution inside one JVM | Large in theory | Very high; not recommended. IntelliJ's test fixtures, the EDT and static singletons such as MockLanguageServer.INSTANCE aren't made for concurrent tests |
| 8 | Local runs: test --rerun instead of --rerun-tasks --no-build-cache |
--rerun reruns only the test task; --rerun-tasks also recompiles and prepares the sandbox again, ~1–2 min per run |
None. A contributor tip for the developer guide |
| 9 | One setup for Build Plugin zip and the plugin verifier, or reuse the CI job's compiled plugin | Runner minutes, not wall time: the workflows run side by side | Low to medium. Workflow restructuring; required checks may change |
Suggested order
- Measure 1 and 2 with one CI run on a branch without JaCoCo and without coverage in 4 jobs, and compare with the times above.
- If they help, keep them (low risk), then consider 3 for wall time.
- Leave 6 for later, only with a sandbox per fork and a check that installer tests don't share files under the user's home. Don't do 7.
Activity
ci: run the macOS tests in two jobs of half the test classes each, si…
ci: EXPERIMENT run 3 test JVMs on Linux, to measure against the 2 tha…
ci: EXPERIMENT run 3 test JVMs on Windows too, and log the least free…
ci: quote the variables of the workflow scripts, and use $(...), as S…
ci: keep 3 test JVMs on GitHub's Linux and Windows runners, where the…
ci: run 3 test JVMs on GitHub's Linux and Windows runners, where the …
ci: quote the variables of the workflow scripts, and use $(...), as S…
test: a fork's copy of the config skips a file or directory that slot…
ci: quote the variables of the PR and nightly workflow scripts, and u…
test: a fork's copy of the config skips a file or directory that slot…
ci: quote the variables of the release workflow's scripts, as ShellCh…
ci: quote the variables of the PR and nightly workflow scripts, and u…
test: a fork's copy of the config skips a file or directory that slot…
7 remaining items
ci: leave the searchable options out of the Test jobs of a pull request
ci: run the PR title check and the disk cleanup of the verifier on th…
ci: verify a pull request without first freeing disk space, which too…
fix: copy the disassembly TextMate bundle atomically, so processes th…
ci: run the macOS tests in two jobs of half the test classes each, si…
ci: run 3 test JVMs on GitHub's Linux and Windows runners, where the …
ci: quote the variables of the PR and nightly workflow scripts, and u…
test: a fork's copy of the config skips a file or directory that slot…
fix: setting the workspace folders configuration shows its preview on…
test: the workspace folders panel test waits for the preview of the l…
test: the workspace folders panel test removes the content roots that…
test: the code action fixture fails with a message when the diagnosti…
test: the directory move tests wait until the language server has rea…
test: the mock language server takes the callback of a didOpen or did…