Skip to content

Re-enable the full Windows test matrix and fix platform failures - #911

Merged
sds merged 7 commits into
mainfrom
fix/windows-test-suite
Nov 5, 2026
Merged

sds merged 7 commits into
mainfrom
fix/windows-test-suite

Conversation

@sds

@sds sds commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Windows CI has been disabled since #836. Restore the full test matrix on Windows for every supported Ruby (2.6–4.0), alongside Linux, and remove the Windows and AppVeyor exclusions from the specs. Give the slower Windows jobs 30 minutes to complete the integration suite while retaining the 15-minute Linux limit. Both platforms now run the same 1,679 examples; no examples are removed or newly skipped.

The restored matrix exposed two production failures:

  • Reading merge state with File.open(...).read leaves handles open until garbage collection, preventing Windows from deleting MERGE_MODE. Use File.read so the handles close immediately. Also close readers and temporary files in the Gerrit specs, and retain commit-message fixtures until each example finishes, to prevent Windows finalizer errors.
  • Parent-command detection depends on WMIC, which is unavailable on current Windows runners. Query Win32_Process through PowerShell's Get-CimInstance, preserving the nil fallback when the command cannot launch or the parent has exited.

Use Ruby's native symlink APIs on Windows instead of invoking mklink and parsing dir output. This supports directory links, raises on creation failures, and lets the restored specs exercise real symlinks with core.symlinks=true. Ten additional examples cover files, directories, missing targets, spaces, and creation errors.

Repair the parallelism regression spec: its previous built-in hook ignored the configured sleep command. An ad hoc serial hook now actually sleeps and writes a marker; the spec requires a successful commit and verifies the marker. Allow 30 seconds for Git and interpreter startup on slower Windows runners instead of the flaky five-second deadline. Two additional examples cover unavailable Windows process information.

Validation:

  • Local Ruby 3.4.7: full suite with 1,679 examples and zero failures; the strengthened parallelism example and all 52 commit-message context examples also pass independently.
  • Tests: all 16 Linux/Windows jobs pass, each with 1,679 examples, zero failures, and zero pending examples. All Windows logs are free of tempfile finalizer errors.
  • Lint, coverage finalization, and all 16 Coveralls statuses pass. All 34 PR checks are green on 03e86dc5.

Refs #836 and #910.

@sds sds changed the title Restore Windows tests across all supported Ruby versions Re-enable the full Windows test matrix and fix platform failures Nov 5, 2026
@sds
sds merged commit c5101bd into main Nov 5, 2026
35 checks passed
@sds
sds deleted the fix/windows-test-suite branch November 5, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant