-
Notifications
You must be signed in to change notification settings - Fork 61
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: setup turbo
#235
chore: setup turbo
#235
Conversation
@sripwoud wow thank you so much for this! Looks like the style job keeps executing indefinitely, isn't it? |
use `style` task instead of build, lint, format use `test` instead of test:{circuits,contracts,libraries}
completes successfully after retriggering it |
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.
LGTM :)
hmm style workflow is taking forever again. Cancelling and re start fixes it. But something is wrong. |
38b169d
to
1a59448
Compare
reorder `dependsOn` tasks exclude `build` task from `style` script
@cedoor fixed I updated the test plan to cover checking the tasks dependencies are well defined. |
Great! It's ready then 👍🏽 |
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 ZK-KIT Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
This PR setups turbo as task handler for the following tasks: formatting, linting, building and testing.
It is not as complex as the proofcarryingdata/zupass#1590 referenced in #207.
But it already speeds up considerably task execution in local environments, and speeds it up somewhat in the ci environments (turbo cache isn't setup yet in ci, but
turbo
executes all tasks in parallel instead of previously sequential&&
chaining).Description
This is only a devops/devtool change.
yarn test:libraries
yarn turbo test:libraries
Test plan
Check caching
inputs
.Check tasks dependencies
Now all the scripts (especially the tests and linting ones) should execute successfully on a fresh repo without requiring to run any build scripts manually beforehand.
ex:
Related Issue(s)
Closes (fully or partially?) #207
Other information
A combination of root level (
//#task
) and package level (task
) tasks are defined inturbo.json
.As the
turbo.json
defines custominputs
for all tasks, we loose the default turbo behavior of ignoring gitignored files, and we need to explicitly define ignore globs for irrelevant files.As this monorepo is quite big and involves lot of config/build/log/cache artifacts, I am not sure the inputs globs I defined are 100% correct.
What this PR does not do
Optimize the GH worklfows (would require setting
.turbo
cache in the GH actions environment).I suggest doing this in a separate PR later.
Checklist
yarn style
without getting any errors