-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: run tests on Windows #646
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #646 +/- ##
==========================================
+ Coverage 77.99% 78.46% +0.46%
==========================================
Files 81 81
Lines 5825 5859 +34
==========================================
+ Hits 4543 4597 +54
+ Misses 1082 1064 -18
+ Partials 200 198 -2 ☔ View full report in Codecov by Sentry. |
Turns out that file -> url translation on Windows is busted, and that this is a hard problem that Go has an internal util for that has not yet been made public - I've done what apparently a number of other packages have done which is copying that helper into here and hoping one day it actually becomes public 😢 Note that until #646 is landed, there is no way to actually verify this is fixing the problem - #553 shows the result of both PRs being merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Added some comments!
internal/sourceanalysis/integration/fixtures-go/snapshots/govulncheckshim_test_windows.json
Outdated
Show resolved
Hide resolved
|
||
Add or append these values to the following config files to ignore this vulnerability: | ||
|
||
`\path\to\sub-rust-project/osv-scanner.toml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this seems weird, I think this is missing the D:\
part and the final osv-scanner.toml is joined with a /
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I've already opened #604 to track fixing this, but want to keep it out of this PR because it's a dedicated bug
This reverts commit fcaba89.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
Unsurprisingly this has required a bunch of tests to be updated to handle slightly different variations in file path handling - this eventually resulted in me implementing an actual internal snapshot testing package but I've not included that in here since its sizable on its own; so please keep that in mind when reviewing . (see https://github.com/G-Rath/osv-scanner/commit/1273da79e2e26a18d663da482dc5f09258e15c51 for a sneakpeek on what the snapshot-based testing looks like)
Note that is failing because file -> url path translation is actually busted; I've opened #645 to fix this and you can see the passing CI when both of these changes are merged in #553Resolves #603
Resolves #553