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

Run unit tests in parallel #2222

Merged
merged 1 commit into from Nov 15, 2021
Merged

Run unit tests in parallel #2222

merged 1 commit into from Nov 15, 2021

Conversation

aahung
Copy link
Contributor

@aahung aahung commented Nov 15, 2021

Issue #, if available:

Description of changes:

Run unit tests in parallel, on my 16-inch macbook pro, the time of make test is reduced from 227.18s to 64.78s, which is a 72% reduction.

Description of how you validated changes:

Checklist:

  • Add/update tests using:
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@mndeveci mndeveci left a comment

Choose a reason for hiding this comment

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

Nice! Can we use the same approach in SAM CLI as well?

@codecov-commenter
Copy link

Codecov Report

Merging #2222 (9946d9b) into develop (e7a1496) will increase coverage by 0.96%.
The diff coverage is 98.41%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2222      +/-   ##
===========================================
+ Coverage    93.58%   94.54%   +0.96%     
===========================================
  Files           90       95       +5     
  Lines         6124     6566     +442     
  Branches      1260     1322      +62     
===========================================
+ Hits          5731     6208     +477     
+ Misses         183      166      -17     
+ Partials       210      192      -18     
Impacted Files Coverage Δ
samtranslator/model/lambda_.py 93.10% <ø> (ø)
samtranslator/plugins/globals/globals.py 99.05% <ø> (ø)
samtranslator/translator/logical_id_generator.py 100.00% <ø> (+9.09%) ⬆️
samtranslator/region_configuration.py 77.77% <63.63%> (-22.23%) ⬇️
samtranslator/swagger/swagger.py 94.02% <94.23%> (+0.66%) ⬆️
samtranslator/model/api/api_generator.py 94.69% <96.55%> (+0.33%) ⬆️
samtranslator/__init__.py 100.00% <100.00%> (ø)
samtranslator/feature_toggle/dialup.py 100.00% <100.00%> (ø)
samtranslator/feature_toggle/feature_toggle.py 100.00% <100.00%> (+12.16%) ⬆️
samtranslator/intrinsics/actions.py 98.75% <100.00%> (+0.03%) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8e4da9...9946d9b. Read the comment docs.

@aahung
Copy link
Contributor Author

aahung commented Nov 15, 2021

Nice! Can we use the same approach in SAM CLI as well?

yep we can

@aahung aahung merged commit b45aef2 into aws:develop Nov 15, 2021
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.

None yet

5 participants