Skip to content
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 9 commits into from
Feb 23, 2021
Merged

💚 Add Windows workflow #176

merged 9 commits into from
Feb 23, 2021

Conversation

wwilsman
Copy link
Contributor

@wwilsman wwilsman commented Feb 8, 2021

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).

@wwilsman wwilsman added the 🧹 maintenance General maintenance label Feb 8, 2021
@wwilsman wwilsman force-pushed the ww/windows branch 29 times, most recently from ea74681 to 0968fff Compare February 14, 2021 02:05
@wwilsman wwilsman force-pushed the ww/windows branch 4 times, most recently from cea5f24 to eb5a544 Compare February 23, 2021 18:41
@wwilsman wwilsman requested a review from Robdel12 February 23, 2021 18:43
@wwilsman wwilsman marked this pull request as ready for review February 23, 2021 18:43
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
Copy link
Contributor

@Robdel12 Robdel12 left a 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

@wwilsman wwilsman merged commit d168ffb into master Feb 23, 2021
@wwilsman wwilsman deleted the ww/windows branch February 23, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 maintenance General maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants