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

Full OS matrix builds for unit and integration tests (Linux, Mac, Windows) #1460

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

jackie-pc
Copy link
Contributor

@jackie-pc jackie-pc commented Jul 28, 2023

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.

  • Use Github Actions OS matrix builds, running the SAME workflow definition across all OSes.
  • Make whatever changes necessary to make the point above possible. E.g. leverage Window's "Git Bash" shell, rewriting certain test utils in Python (instead of from POSIX-focused shell tools).

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.

@jackie-pc jackie-pc force-pushed the jackie-windows-integration branch 2 times, most recently from c853645 to 44a5e5d Compare July 30, 2023 04:42
@jackie-pc jackie-pc changed the title [WIP] Merging existing integration tests for Linux Full OS matrix builds for unit and integration tests (Linux, Mac, Windows) Jul 30, 2023
@jackie-pc jackie-pc force-pushed the jackie-windows-integration branch 2 times, most recently from e340b9f to e34bfb1 Compare July 31, 2023 16:23
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not run tests on docs.

If we need any linting on docs specifically, we should create a separate workflow with different trigger conditions (e.g. if *.md's changed, run "md-lint" workflow)

@jackie-pc jackie-pc marked this pull request as ready for review July 31, 2023 16:58
@jackie-pc jackie-pc force-pushed the jackie-windows-integration branch 3 times, most recently from 7bc5c2e to e97edd0 Compare August 1, 2023 17:24
Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it broken! 🚢 💥

@picklelo picklelo merged commit 837978f into main Aug 1, 2023
23 of 32 checks passed
@picklelo picklelo deleted the jackie-windows-integration branch August 11, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants