-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ref(nextjs): Small changes to nextjs
integration test runner
#3819
Merged
lobsterkatie
merged 14 commits into
master
from
kmclb-nextjs-more-integration-test-fixes-july-2021
Jul 20, 2021
Merged
ref(nextjs): Small changes to nextjs
integration test runner
#3819
lobsterkatie
merged 14 commits into
master
from
kmclb-nextjs-more-integration-test-fixes-july-2021
Jul 20, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report
|
kamilogorek
reviewed
Jul 20, 2021
# Delete yarn's cached versions of sentry packages added during this test run, since every test run installs multiple | ||
# copies of each package. Without this, the cache can balloon in size quickly if integration tests are being run | ||
# multiple times in a row. | ||
find $(yarn cache dir) -iname "npm-@sentry*" -newermt "$START_TIME" -mindepth 1 -maxdepth 1 -exec rm -rf {} \; |
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.
❤️
kamilogorek
approved these changes
Jul 20, 2021
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.
Beautiful
AbhiPrasad
approved these changes
Jul 20, 2021
lobsterkatie
deleted the
kmclb-nextjs-more-integration-test-fixes-july-2021
branch
July 20, 2021 13:24
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes a number of small tweaks to the integration test runner in
@sentry/nextjs
, mostly changes I made to help myself as I was trying to debug failing tests in another PR, either because they made the debugging itself easier or because they sped up the overall running of the test suite (in most cases by doing things only once instead of multiple times where possible).Included changes:
Add a default version of
nextjs
to the integration test project’s dependencies. This makes it possible to callyarn
(andyarn build
) out of the context of the test runner script (specifically, when using a debugger).Add a VSCode debug profile for nextjs integration tests.
Speed up initial setup by only having
yarn
install packages once per version ofnext
(instead of once to install all non-nextjs
packages, and again when adding the specific version ofnext
).Back up
next.config.js
outside of the loops, so we’re guaranteed to restore from the original.As part of cleanup, nuke all of
node_modules
rather than just removingnextjs
(we’re going to deletenode_modules
before the next run anyway, and this wayyarn
doesn’t go through yet another install process on its way out the door).Also as part of cleanup, remove all files added to the yarn cache as a result of this test run, in order to prevent the cache from growing arbitrarily large.
Only run check on node version once, since it’s the same across all loops.
Label each event/transaction/session displayed (when using
--debug
on server tests) with the name of the test it's from.Remove test for tracing 404s, since it the underlying code doesn’t actually work on its own (this is okay; we don’t capture 404s in any other framework).
Make some formatting changes (as insisted upon by the auto-formatter).
Add some comments and clean up logging a little bit.