-
Notifications
You must be signed in to change notification settings - Fork 87
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
Optimize CI #1553
Optimize CI #1553
Conversation
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.
note: The initial value of balance
is 1777
when the contract is deployed. Previously, we assumed it was 1897
, as other tests modified the balance
value. This made the tests interdependent, relying on changes made by other tests. Now they use separate contract, ultimately enabling parallel execution.
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.
I don't really think this test was meant to check storage after increasing balance - if so, we can easily add a test for invoke + check storage. However, then this is more a test for contract itself, not for our API.
….com/software-mansion/starknet.py into franciszekjob/optimize-running-tests
Closes #
Introduced changes
-n auto
flag when running tests withpytest
, which will spawn a number of workers processes equal to the number of available CPUs, and distribute the tests randomly across them, docs referencetest_call_contract
andtest_get_storage_at
previously used a contract shared across other tests. This PR adjusts them, so they use a separate contract, i.e. they are not influenced by other testsComparison (Linux)
Before: ~13/14 minutes
Now: ~7/8 minutes