ci: smart CI — path-gated tests, caching, targeted pytest#5
Open
duducpp wants to merge 8 commits into
Open
Conversation
- Add detect-changes job using tj-actions/changed-files - Gate build job on docs/**, src/**/*.py, or pyproject.toml changes - workflow_dispatch always runs regardless of path filter
- Detects which solidlsp language server files changed via tj-actions/changed-files - Detects core solidlsp/serena file changes (triggers full test run) - Extracts language IDs from super().__init__() 4th positional arg via AST - Maps language IDs to test/solidlsp/* paths (handles html_ls, json_ls, yaml_ls overrides) - Outputs: language-ids (JSON array), test-paths, any-ls-changed, core-changed
… runs Path filtering: - Workflow only triggers on src/**, test/**, pyproject.toml, uv.lock changes - detect-changes job uses detect-ls-changes action to identify changed language servers New lint job (fast, Ubuntu-only): - Runs poe lint + poe type-check without installing any language servers - Gated on Python/config file changes only Caching (new): - Swift toolchain (Linux ~/.local/share/swiftly, macOS ~/.swiftly) keyed by version - R packages (~/R) keyed by R + languageserver version - Julia depot (~/.julia) keyed by Julia + LanguageServer version - Perl modules (~/perl5) keyed by OS - FPC downloads (~/fpcsrc on macOS, ~/fpc + ~/fpcsrc on Windows) keyed by version - Cabal store (~/.cabal/store + dist-newstyle) keyed by .cabal file hash - Nix store via nix-community/cache-nix-action with weekly rotation Conditional installs: - Each language toolchain only installs when core-changed or its language ID appears in the changed language server files (elixir/erlang, clojure, cpp, java/kotlin/ groovy/scala, csharp/fsharp, swift, ruby, ocaml, r, julia, haskell, zig, systemverilog, lua/luau, perl, ansible, haxe, elm, nix, rego, pascal, lean4, terraform, angular/typescript) Targeted pytest: - Runs pytest on specific test/solidlsp/<lang>/ paths when only LS files changed - Falls back to full pytest test suite when core files changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/**,src/**/*.py,pyproject.toml).github/actions/detect-ls-changesextracts which language servers changed and maps them to test pathsTest plan
svelte_language_server.py) → only Svelte toolchain installed, onlytest/solidlsp/svelterunssrc/serena/orpyproject.toml→ full toolchain install + full test suiteworkflow_dispatchon docs → always builds