Repository navigation
🌱 Run unit tests on Windows in CI - #5347
Draft
jessehouwing wants to merge 6 commits into
Draft
jessehouwing wants to merge 6 commits into
jessehouwing wants to merge 6 commits into
Conversation
Prevents core.autocrlf checkouts from breaking byte-exact patch tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
- Close archive input files in the tarball extractors and test setups so temp dirs can be removed on Windows. - Treat repo-relative paths as slash-separated (path vs. filepath) in IsWorkflowFile, fileIsInVendorDir and the localdir client. - Close files read in tests before cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
jessehouwing
force-pushed
the
windows-ci-unit-tests
branch
from
October 18, 2026 11:14
428eada to
891984e
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
jessehouwing
force-pushed
the
windows-ci-unit-tests
branch
from
October 18, 2026 11:39
891984e to
92a1154
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
jessehouwing
force-pushed
the
windows-ci-unit-tests
branch
from
October 18, 2026 12:22
ca47948 to
6f5c5e3
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jesse Houwing <jesse.houwing@gmail.com>
jessehouwing
force-pushed
the
windows-ci-unit-tests
branch
from
October 18, 2026 12:22
6f5c5e3 to
9f30bfc
Compare
This was referenced Oct 18, 2026
This branch has not been deployed
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.
What kind of change does this PR introduce?
CI improvement: run the unit tests on Windows as well.
What is the current behavior?
All unit tests run on
ubuntu-latestonly. Windows-only failures went unnoticed, including real bugs (workflow files not detected, vendor directory exclusion,localdirpaths, a file handle leak); see #5344 and #5342.What is the new behavior (if this is a feature change)?
Adds a
unit-test-windowsjob tomain.ymlthat runs the unit tests onwindows-latest:go test -race -covermode=atomic $(go list ./...)withSKIP_GINKGO=1, run underbash.makeis not listed on the Windows runner image, and theunit-testMakefile target relies on POSIX shell features, so the same flags are invoked directly. Coverage upload and the e2e steps stay on the Linux job.Harden Runner in audit mode, which now supports Windows runners.
A step before checkout sets
core.autocrlf=falseandcore.eol=lf, so Windows checkouts keep LF (also enforced by.gitattributesin 🐛 Fix Windows path handling and file handle bugs #5342).Tests for the changes have been added (for bug fixes/features)
Not applicable, this is a CI change. It was tested on a fork instead (see below).
Which issue(s) this PR fixes
Related to #5344
Special notes for your reviewer
This is stacked on #5342, whose commits are included here. It should be merged after it, otherwise the new job fails on the bugs that PR fixes. Once #5342 is merged this PR only contains the
main.ymlchange.Testing: the job was run on a test fork with these commits (#5342 plus this job), and
unit-test (windows)succeeds onwindows-latest: https://github.com/jessehouwing/test-ossf-scorecard/actions/runs/39127045819/job/117674248040The job has not run on this repository's CI yet, so the first run here may still reveal environment-specific differences.
Does this PR introduce a user-facing change?