-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore: speed up functional tests #598
chore: speed up functional tests #598
Conversation
008a775
to
d8d3c82
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #598 +/- ##
=======================================
- Coverage 91.1% 90.7% -0.4%
=======================================
Files 38 38
Lines 1086 1086
Branches 224 224
=======================================
- Hits 990 986 -4
- Misses 81 85 +4
Partials 15 15 ☔ View full report in Codecov by Sentry. |
143fe02
to
b46d7cb
Compare
deptry
from wheele1a5c76
to
7a94e55
Compare
@@ -14,13 +14,18 @@ check: ## Run code quality tools. | |||
@echo "🚀 Checking for dependency issues: Running deptry" | |||
@pdm run deptry python | |||
|
|||
.PHONY: test |
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.
Is it an idea to keep this command to make it easier to run all unit tests locally?
.PHONY: test | |
.PHONY test: | |
test: test-unit test-functional | |
```bash | ||
make test |
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.
If we add the make test
command back like suggested above, we can revert this change.
Makefile
Outdated
.PHONY: test-functional | ||
test-functional: ## Run functional tests. | ||
@echo "🚀 Running functional tests" | ||
@pdm run pytest tests/functional -n auto |
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.
Should we also add --dist loadgroup
here?
@pdm run pytest tests/functional -n auto | |
@pdm run pytest tests/functional -n auto --dist loadgroup |
Co-authored-by: Florian Maas <fpgmaas@gmail.com>
716000b
to
d29da65
Compare
Resolves #597.
PR Checklist
docs
is updatedDescription of changes
This speeds up functional tests by implementing the 2 solutions mentioned in: #597:
deptry
wheel is now built at the beginning of functional tests, then used whenever a functional test needs to bootstrap a new environmentloadgroup
, to ensure that tests that use the same test project end up on the same process, since if we have multiple tests that bootstrap the same project, we only bootstrap the project onceThe speedup is definitetely noticeable by comparing a recent build with a build in this PR. If we take
linux (3.12, x86_64)
as an example, we go from ~167s to ~66s.