Repository navigation
Speed up tests by stubbing SDK commands - #18
Merged
Merged
Conversation
The suite launched real dart, flutter, and fvm processes, including pub get, build_runner, and major upgrades. Those calls depended on the network and which SDKs were installed, so CI spent several minutes on them and sometimes timed out. Tests now use local command stubs and a shared kernel snapshot. CI no longer installs Flutter or FVM. Co-authored-by: Rexios <rexios@rexios.dev>
The stubbed suite skips the pub solver. One test now resolves meta with the real solver and checks that pub get --offline writes a lockfile. Co-authored-by: Rexios <rexios@rexios.dev>
Rexios80
marked this pull request as ready for review
October 1, 2026 20:26
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
The test suite was an integration suite against real
dart,flutter, andfvmprocesses.pub get,pub upgrade --major-versions,build_runner, andflutter testall ran for real, so a run depended on pub.dev and on which Flutter SDKs were installed. CI spent several minutes installing FVM and Flutter, then several more on the tests, and jobs sometimes timed out (puby genat 2 minutes, project discovery at 30 seconds).Tests now check puby's own behavior:
test/stubsprovidesdart,flutter, andfvmthat exit immediately, return the exit codes puby checks, and write the workspace metadata and.dart_tool/versionfiles the assertions read.PUBY_TEST_MODEskips the pub solver and package downloads insidepuby linkfor those tests. Project selection still runs.meta) with the solver and checks thatdart pub get --offlinewrites a lockfile. It does not use Flutter or FVM.pub get.dart bin/puby.dartwas recompiling the bundled pub solver on every test (about 8 seconds each).Locally the suite finishes in about 7 seconds. CI no longer installs Homebrew, FVM, or Flutter, which also avoids the current
homebrew/actions@mastersetup failure.Test plan
dart format --set-exit-if-changed .dart analyze --fatal-infosdart test(passed, includingpuby link resolves a hosted package)