-
Notifications
You must be signed in to change notification settings - Fork 48
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
💚 Add Windows workflow #176
Merged
Merged
Conversation
This file contains 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
ea74681
to
0968fff
Compare
cea5f24
to
eb5a544
Compare
This script must work for any tests to work. Since it is technically tested by running before tests, it does not generate coverage. In order to generate coverage, the existing browser install directory is deleted within the test. This causes issues on Windows and actually makes the test suite slower overall. Removing the test solves the issue on Windows, speeds up the test suite, and is still required to work for almost any tests.
This is needed specifically for Windows
Robdel12
approved these changes
Feb 23, 2021
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.
🏁 the fight is over, very nice hahaha
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 is this?
This PR adds a Windows CI workflow and fixes a few issues that cause test failures in Windows environments. For the most part, this involves using path helpers rather than hardcoding path separators.
Windows also has issues with atomic file operations. Errors from
rimraf
are now ignored in@percy/core
tests, and the browser installation test was removed due to it also needing to delete files. Since this test was removed, browser installation coverage became zero which prompted a coverage ignore statement to be added. Ultimately, the tests need the browser to be downloaded in order to work, so I'm confident in removing coverage from this file since it is technically tested before any relevant tests run.One final hanging issue was that
@percy/cli-exec
tests were hanging, but only in Windows CI. In a local Windows environment, I was unable to reproduce. Debugging showed it to be because of the browser processes's stdio pipes being left open. Even stranger, is@percy/core
tests were not hanging even though the source seemed to be stemming from there. In the end, I found this internal Node issue in which a comment mentions a workaround for ending the piped streams manually after the process exits. Adding that change indeed fixed the hanging issue, and another comment points to the issue being fixed as of Node 13. Since Node 12 still has a year of life left, we should leave this workaround in for the time being (even though I didn't experience it myself locally).