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

chore(aws-cdk-lib): increase jest test speed, remove warnings #26854

Merged
merged 21 commits into from
Aug 25, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Aug 23, 2023

Two changes to the jest tests:

  • We are currently running the tests directly from .ts source files using ts-jest. Disable type checking (by setting isolatedModules: true) to improve the speed. This brings down running 4 test suites from an arbitrary service (aws-servicecatalog) down from 79s to 19s on my machine.
  • Change the "coverage ignore files" a little to get rid of the "Note: The code generator has deoptimised the styling" errors produced by jest when it wants to read the coverage of the generated source files.

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

Two changes to the `jest` tests:

- We are currently running the tests directly from `.ts` source files
  using `ts-jest`. Disable type checking (by setting `isolatedModules:
  true`) to improve the speed. This brings down running 4 test suites
  from an arbitrary service (`aws-servicecatalog`) down from `79s` to
  `19s` on my machine.
- Change the "coverage threshold" ignore files a little to get rid of
  the "Note: The code generator has deoptimised the styling" errors
  produced by jest when it wants to read the coverage of the generated
  source files.
@rix0rrr rix0rrr requested a review from a team August 23, 2023 12:42
@github-actions github-actions bot added the p2 label Aug 23, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 23, 2023 12:42
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 23, 2023
@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Aug 23, 2023
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Aug 23, 2023

This would be great but it doesn't actually work. It will always prefer .js files over .ts files, and there's no way to convince it otherwise.

Given that we do in-place compilation, this is going to mess with our workflow too much.

We'll need to do a deep dive on this.

@rix0rrr rix0rrr removed the pr/do-not-merge This PR should not be merged at this time. label Aug 25, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: fc5e1fa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 6227c94 into main Aug 25, 2023
8 of 9 checks passed
@mergify mergify bot deleted the huijbers/jest-faster branch August 25, 2023 06:19
@mergify
Copy link
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants