-
-
Notifications
You must be signed in to change notification settings - Fork 331
Improve test runner speed #1317
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
Merged
Archmonger
merged 45 commits into
reactive-python:main
from
Archmonger:v2-faster-test-suite
Dec 14, 2025
Merged
Changes from 33 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
2a4ed92
Improve test runner speed
Archmonger b5fd55a
Add pytest-timeout
Archmonger f44acf4
Add compatibility for test in `--parallel` mode
Archmonger b5ec6ad
fix coverage
Archmonger 02cb5ab
Attempt fix for failing tests
Archmonger 0c63629
Move test dep configuration out of Pytest and into Hatch
Archmonger b772582
self review
Archmonger 9dcce14
fix tests
Archmonger b4d5c73
fix coverage
Archmonger 9f318fd
Extend timeout since GITHUB_ACTIONS windows runners are slow
Archmonger 0e60b47
Remove usage of anyio pytest marker
Archmonger 3f92746
fix coverage script sequence
Archmonger 5219744
Attempt different way of setting max timeout
Archmonger c09115f
Move playwright installation to a build script
Archmonger 21c99a1
attempt setting timeout on `expect` global
Archmonger 13175f3
Fix test runtime warnings
Archmonger d9c1163
delete old coverage files each test run
Archmonger f479f78
Try increasing global test timeout
Archmonger 4acf27c
export github actions within reactpy.testing
Archmonger 6970d50
fix `pip install -e .`
Archmonger bfba38c
minor f-string refactor
Archmonger 9216c92
Add bundle flag to npm modules
Archmonger e1a8f93
Rewrite JS build steps. Rewrite fetching logic for remote components,…
Archmonger 173682d
Remove copy from build script
Archmonger b7f533b
Fix JS linting
Archmonger 5733044
Attempt fix for flaky ReactJS component mounting
Archmonger 0bf49c5
attempt 2
Archmonger fd9b557
attempt 3
Archmonger b7f5dff
attempt 4
Archmonger 34d925b
Attempt 5
Archmonger 623596d
simplify bind logic
Archmonger 1afde56
Use a deterministic way of waiting for elements in npm tests
Archmonger 5c9e648
bugfix for null root element
Archmonger a74cee5
update docstring
Archmonger 92ed04d
add --max-worker-restart
Archmonger fbe8530
remove unused import
Archmonger 1afc57b
Attempt increasing timeout
Archmonger 46a2651
Increase re-runs on github
Archmonger 81e8c57
Add logging for failed http requests
Archmonger e1c10e0
Try setting up a RAM disk
Archmonger 190fea2
ry setting hatch to use R drive
Archmonger ea1ff39
symlink playwright to ram drive
Archmonger 7c59e11
use powershell cmd
Archmonger ce37028
try different path
Archmonger dd19d14
Remove ram drive, try using github cache
Archmonger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [] | ||
| # /// | ||
| import pathlib | ||
| import subprocess | ||
| import sys | ||
|
|
||
| dev_mode = "--dev" in sys.argv | ||
| root_dir = pathlib.Path(__file__).parent.parent.parent | ||
| build_commands = [ | ||
| [ | ||
| "bun", | ||
| "install", | ||
| "--cwd", | ||
| "src/js/packages/@reactpy/app", | ||
| *([] if dev_mode else ["--production"]), | ||
| ], | ||
| [ | ||
| "bun", | ||
| "run", | ||
| "--cwd", | ||
| "src/js/packages/@reactpy/app", | ||
| "buildDev" if dev_mode else "build", | ||
| ], | ||
| ] | ||
|
|
||
| for command in build_commands: | ||
| print(f"Running command: '{command}'...") # noqa: T201 | ||
| subprocess.run(command, check=True, cwd=root_dir) # noqa: S603 |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [] | ||
| # /// | ||
| import pathlib | ||
| import subprocess | ||
| import sys | ||
|
|
||
| dev_mode = "--dev" in sys.argv | ||
| root_dir = pathlib.Path(__file__).parent.parent.parent | ||
| build_commands = [ | ||
| [ | ||
| "bun", | ||
| "install", | ||
| "--cwd", | ||
| "src/js/packages/@reactpy/client", | ||
| *([] if dev_mode else ["--production"]), | ||
| ], | ||
| [ | ||
| "bun", | ||
| "run", | ||
| "--cwd", | ||
| "src/js/packages/@reactpy/client", | ||
| "build", | ||
| ], | ||
| ] | ||
|
|
||
| for command in build_commands: | ||
| print(f"Running command: '{command}'...") # noqa: T201 | ||
| subprocess.run(command, check=True, cwd=root_dir) # noqa: S603 |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [] | ||
| # /// | ||
| import pathlib | ||
| import subprocess | ||
| import sys | ||
|
|
||
| dev_mode = "--dev" in sys.argv | ||
| root_dir = pathlib.Path(__file__).parent.parent.parent | ||
| build_commands = [ | ||
| [ | ||
| "bun", | ||
| "install", | ||
| "--cwd", | ||
| "src/js/packages/event-to-object", | ||
| *([] if dev_mode else ["--production"]), | ||
| ], | ||
| [ | ||
| "bun", | ||
| "run", | ||
| "--cwd", | ||
| "src/js/packages/event-to-object", | ||
| "build", | ||
| ], | ||
| ] | ||
|
|
||
| for command in build_commands: | ||
| print(f"Running command: '{command}'...") # noqa: T201 | ||
| subprocess.run(command, check=True, cwd=root_dir) # noqa: S603 |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [] | ||
| # /// | ||
|
|
||
| import logging | ||
| from glob import glob | ||
| from pathlib import Path | ||
|
|
||
| # Delete old `.coverage*` files in the project root | ||
| print("Deleting old coverage files...") # noqa: T201 | ||
| root_dir = Path(__file__).parent.parent.parent | ||
| coverage_files = glob(str(root_dir / ".coverage*")) | ||
|
|
||
| for path in coverage_files: | ||
| coverage_file = Path(path) | ||
| if coverage_file.exists(): | ||
| try: | ||
| coverage_file.unlink() | ||
| except Exception as e: | ||
| logging.error(f"Failed to delete {coverage_file}: {e}") |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [] | ||
| # /// | ||
|
|
||
| import subprocess | ||
|
|
||
| print("Installing Playwright browsers...") # noqa: T201 | ||
|
|
||
| # Install Chromium browser for Playwright, and fail if it cannot be installed | ||
| subprocess.run(["playwright", "install", "chromium"], check=True) # noqa: S607 | ||
|
|
||
| # Try to install system dependencies. We don't generate an exception if this fails | ||
| # as *nix systems (such as WSL) return a failure code if there are *any* dependencies | ||
| # that could be cleaned up via `sudo apt autoremove`. This occurs even if we weren't | ||
| # the ones to install those dependencies in the first place. | ||
| subprocess.run(["playwright", "install-deps"], check=False) # noqa: S607 |
Binary file not shown.
This file contains hidden or 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
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from "preact/compat/jsx-runtime"; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,5 +31,5 @@ | |
| "checkTypes": "tsc --noEmit" | ||
| }, | ||
| "type": "module", | ||
| "version": "1.0.3" | ||
| "version": "1.0.2" | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.