turbo
turbo copied to clipboard
Add GitHub Action for Turborepo
Describe the feature you'd like to request
Currently, GitHub actions setup is supported in the docs, but isn't fully optimised and doesn't feel 'first class'. Having an official action would smooth various things out.
Problems this would solve
Output
Currently, running Turbo in a GH action doesn't give you a breakdown in the UI of how long different tasks take. Because you generally run yarn turbo run lint test build
, you only see a breakdown of how long that single command took. Doing some automatic splitting up of tasks run would make the whole process a lot more introspectable, and also detail whether the results of different tasks were cached.
(note - I'm not sure whether this 'task splitting up' business is even possible in Actions, this would need a spike)
Setup
The GitHub action would likely behave differently from the CLI - it could error if you don't pass a valid remote cache token. This would make the errors and setup clearer for new folks using the action.
Describe the solution you'd like
Something similar to this would be stellar:
- uses: actions/turborepo
with:
tasks: "lint build test test:cypress"
token: ${{ secrets.TURBO_TOKEN }}
team: "my-team"
Describe alternatives you've considered
For the first problem (not good enough information about output) add a --debug
flag. This still won't feel first class in GH actions, but que sera sera.
Add a flag to --ensure-remote-cache
to make sure that users FOR SURE have added a valid token.
@mattpocock Sounds like a cool idea!
This would make the errors and setup clearer for new folks using the action.
Makes sense.