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

Improve Test Compiling #2338

Merged
merged 21 commits into from
May 2, 2023

Conversation

AlbertoBrusa
Copy link
Contributor

@AlbertoBrusa AlbertoBrusa commented Apr 5, 2023

  • Attempt to use @swc/jest as a test runner instead of ts-jest
  • Put functionality under --swc flag as to not create a breaking change
  • Test speed differences between various compiler configurations:
    esmView test run locally:
    previously took: 163s
    Now takes: 89s
    Overall test times seem to be down anywhere between 5-10 minutes (varies run to run)
  • Update docs
  • Fix test command

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

🦋 Changeset detected

Latest commit: 0101272

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
modular-scripts Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link
Collaborator

coveralls commented Apr 5, 2023

Coverage Status

Coverage: 49.533% (+5.6%) from 43.902% when pulling 0101272 on AlbertoBrusa:speed-test into fdf2f71 on jpmorganchase:feature/v4.4.

@AlbertoBrusa AlbertoBrusa changed the base branch from feature/v4.3 to feature/v5.0 April 6, 2023 10:12
@AlbertoBrusa AlbertoBrusa changed the base branch from feature/v5.0 to feature/v4.4 May 2, 2023 09:14
@@ -36,7 +36,7 @@ jobs:
- name: 'Build internal prerequisites'
run: yarn workspace @modular-scripts/workspace-resolver build
- name: Run Tests
run: yarn test --coverage
run: yarn test --coverage --regex="./packages/*"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yarn test won't work for us, cause most of our packages aren't actual modular packages

@@ -14,7 +14,7 @@
"lint:fix": "yarn lint --fix",
"create-modular-react-app": "ts-node packages/create-modular-react-app/src/cli.ts",
"modular": "ts-node packages/modular-scripts/src/cli.ts",
"test": "cross-env NODE_OPTIONS=--max_old_space_size=5120 yarn modular test --regex --watchAll false --runInBand --env node --transformIgnorePatterns \"node_modules/(?!rollup)/\"",
"test": "cross-env NODE_OPTIONS=--max_old_space_size=5120 yarn modular test --swc --runInBand --env=node",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Over time between test bugs and trying to make things work I must have messed up our default test command - should be alright now

"@types/case-sensitive-paths-webpack-plugin": "^2.1.6",
"@types/lodash": "^4.14.191",
"@types/micromatch": "4.0.2",
"@types/node": "^18.11.18",
"@types/npmcli__arborist": "^5.6.0",
"@types/postcss-normalize": "^9.0.1",
"@types/shell-quote": "^1.7.1",
"@types/webpack": "^5.28.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure why this got removed? - don't remember doing it.
nothing broke so I'm wondering if the types came with webpack already and this was unnecessary

@AlbertoBrusa AlbertoBrusa marked this pull request as ready for review May 2, 2023 09:49
@AlbertoBrusa AlbertoBrusa merged commit d4a64ef into jpmorganchase:feature/v4.4 May 2, 2023
@AlbertoBrusa AlbertoBrusa deleted the speed-test branch May 2, 2023 10:23
@github-actions github-actions bot mentioned this pull request May 9, 2023
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.

4 participants