-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Examples tests revamp. #7098
Examples tests revamp. #7098
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Ignored Deployments
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
|
|
||
# Head into a temporary directory | ||
mkdir -p ../../examples-tests-tmp | ||
cd ../../examples-tests-tmp |
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.
We're going to work in a temporary directory for better test isolation. Ya know, like I actually know what I'm doing finally.
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.
Mostly there, there's some script cleanup to do. I'd also install shellcheck
as a VS Code extension if you don't have it already (it's a linter essentially), I've found that to be a pretty useful learning tool!
turbo_command="turbo build lint" | ||
|
||
# Head into a temporary directory | ||
mkdir -p ../../examples-tests-tmp |
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.
In case you didn't already know, there's a handy way of making a tmp directory (that you never need to touch again, the OS will just clean it up on restart):
xx=$(mktemp -d)
echo $xx # gives you the full path to the new dir)
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.
I've handled everything but this. I can't seem to get the randomized directories to play nice with everything else. 🤔
This would be a small, small win for local debugging. I'm okay with punting it.
Co-authored-by: Mehul Kar <[email protected]>
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.
Ran it locally and the tests passed, nice job!
I don't love that it leaves a examples-tests-tmp/
laying around my repo which is largely a duplicate of examples/
, but I guess that's ok and/or we can take it another pass. (I'm concerned about things like the extra noise when using find
locally, etc etc).
Approving since we've gone a few rounds on this and I'd rather discover any problems and iterate than try to hunt them all down now.
The tests for examples have proven to be a point of friction for us. This PR aims to fix that.
Try it out locally with
turbo test -F "@turborepo-examples-tests*" --continue --concurrency=5
There is a bit of technical debt associated with these tests, I'm told. Historically, these tests were used more like integration or end-to-end tests to ensure that
turbo
was behaving predictably on example monorepos.Today, we're making the explicit commitment that these tests no longer need to serve that goal. Instead, they are for ensuring that the examples work correctly against the latest published version of
turbo
. We're making sure that users can trust thatnpx create-turbo@latest [-e <some-example>]
will work out of the box.Problems to solve
turbo
indefinitely.turbo
.Non-goals
turbo
@HEAD
.Key changes
Results
TODO?
latest
. (This is slightly mitigated by Dependabot always running on Mondays. We would find out thatlatest
broke an example then.)Closes TURBO-2177