-
Notifications
You must be signed in to change notification settings - Fork 56
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
test: Vendor kcl-samples and add simulation tests for them #5460
base: main
Are you sure you want to change the base?
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
why not a submodule? its easier in my head than curling it all the time and when we update we just update the submodule plus dependabot could do that for us and we get auto tests thats kinda cool also helps diffs etc |
also if its a submodule people cant change individual files out of band of the og repo |
We'd like the source of truth of kcl-samples to be in modeling-app. Supposedly @jgomez720 and @nicboone8 agreed to this under the condition that changes to only kcl-samples don't run the full modeling-app e2e test suite. A git submodule would be a step backwards. |
9f8706a
to
cff246e
Compare
82f57fc
to
8c4780d
Compare
861ff7a
to
fdb6de7
Compare
e990f1e
to
26ad4c1
Compare
26ad4c1
to
6e296e1
Compare
Overview
public/kcl-samples
. We omitscreenshots
andstep
output files.To Do
multi-axis-robot
andwalkie-talkie
.Implementation
yarn fetch:samples
downloads kcl-samples. @pierremtb implemented this and the ZMA integration.yarn install
is decoupled from fetching kcl-samples. It's part of the dev workflow that shouldn't force people to update kcl-samples if they don't want to.Since Rust doesn't (out of the box) have a nice way to generate many tests, I made a single test for each parse, unparse, and kcl_test_execute.
kcl_test_execute
et al run on all KCL samples in a single Rust test. I chose this because the alternative is that we'd need an explicit list of samples in a.rs
file to change every time the list of KCL samples changed, which seemed inconvenient. We could change this in the future pretty easily if we like.Because of the chosen Rust module structure,
just
commands work.You can also run a single one by filtering to a test prefix:
Future Work
I think that it would be nicer if modeling-app were the source of truth for kcl-samples, and we had a CI action that made a PR to the kcl-samples repo. We already use this approach for the OpenAPI specs. But, in my opinion, this PR is better than what we currently do, which is let bugs reach production.