-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: parellelize tests in CI #238
Conversation
18d446f
to
a1b92bc
Compare
a1b92bc
to
04a1e3e
Compare
a824765
to
72fc266
Compare
d3a2281
to
1e2fb0e
Compare
1e2fb0e
to
585b5a1
Compare
# Conflicts: # .circleci/config.yml
3cea84d
to
b013382
Compare
# Conflicts: # .circleci/config.yml
# Conflicts: # CHANGELOG.md
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.
Nice speedup, well done!
I guess the appropriate number of threads depends on the number of CPUs/cores that are available in a circleCI run?
Would using pytest-xdist make sense to "automate" the parallelization of tests instead of dealing with the executors "manually"?
No, I think each CircleCI executor is a separate execution environment, either a Docker container or a virtual machine. (https://circleci.com/docs/executor-intro/)
Yes, that would also good so that it would run in parallel also locally, but that would mean some tests and code refactoring. This way is easier for now. Also I wonder if CircleCI executors have several CPUs/cores? |
d6cd224
to
8c6dce3
Compare
Add install step cache fallback
Parallelize the execution of tests among 4 CircleCI executors. This results in a gain of an average approx. ~40% on the total CI execution time (around 60% specifically on the tests job)
Before:
![Screenshot 2024-12-20 at 20 32 49](https://private-user-images.githubusercontent.com/4353767/397725893-95548aa8-0c32-44c5-ab88-23a8f21cb045.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTMyMDMsIm5iZiI6MTczOTE5MjkwMywicGF0aCI6Ii80MzUzNzY3LzM5NzcyNTg5My05NTU0OGFhOC0wYzMyLTQ0YzUtYWI4OC0yM2E4ZjIxY2IwNDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTMwODIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWJmOWI4MjI5NjZiYzNmYjVkNjk2NTEyYzExNzAwOGQxNzRhMjQ3OGU2ZTNlOTA0ODE5ODg2ZThhYzExNDllMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cnHozF7v3prgKDJ1R7Nul45kzmgjhBjoI3sbj08tq1g)
After:
![Screenshot 2024-12-20 at 20 32 38](https://private-user-images.githubusercontent.com/4353767/397725928-fcc5f878-ced2-4413-8aa1-0bbf9d596f13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTMyMDMsIm5iZiI6MTczOTE5MjkwMywicGF0aCI6Ii80MzUzNzY3LzM5NzcyNTkyOC1mY2M1Zjg3OC1jZWQyLTQ0MTMtOGFhMS0wYmJmOWQ1OTZmMTMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTMwODIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGZhZWMwZDcwM2E2NDYwZGQ4NGQwODNhMzQ4YzVkODExMDAxYWU3NjgzOTAwZTViZTg3ZWQzM2ZkOTRiMzc5MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.9Elzml9-vd35p2rUUH7Ow-KHXoJM0y82XACWUL8r30c)