Full OS matrix builds for unit and integration tests (Linux, Mac, Windows) #1460
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.
This PR enables CI across all three supported OSes: Linux, Mac, Windows. For Mac and Windows, this represents a 0 to 1 improvement in automated test coverage.
It is very important to minimize (or avoid) any code duplication in order to support all three OSes. Most code changes in this PR were made with this goal in mind. E.g.
In the new world, workflows have been refactored as follows:
integration_tests.yml
workflow: this includes OS matrix jobs for "counter" and "reflex-web" integration tests.unit_tests.yml
workflow: this includes a single OS matrix job for running unit tests.There were also a couple of drive-by bug fixes. They came up only as a side-effect of debugging Windows test failures. The bugs and their fixes were obvious. However it's unclear yet how exactly they affected the Windows tests in particular. Either way, fixing them seems to correlate with getting Windows build green.
Note in terms of speed, running all these tests in Windows are significantly slower than on Linux and Mac. Most of the perf penalty is likely related to general known poor perf of Windows VMs in Github Actions. Not much we can do about this. We do not run WSL (might be faster), and that is by design - we want to test in a pure non-WSL Windows OS. If we want to include WSL coverage in future, it should be "in addition to", and not instead of vanilla Windows coverage.