github-action
github-action copied to clipboard
[Feature request] Add support for Bun
Just opening a feature request for Bun support. It implies:
- support for install deps command
- support for deps caching
I may open a new PR soon, if I find that Bun really improves performances on our project.
Any updates Bun 1.0 (prod ready) is out, this is a must nowadays
Any updates here?
If somebody wants to use Bun with GitHub Actions, they can use the workflow .github/workflows/single.yml from the demo repo cypress-io/cypress-example-kitchensink as a template (which does not rely on cypress-io/github-action
).
- Replace
actions/setup-node
bynpm install -g bun
- Change the cache lockfile from
package-lock.json
tobun.lockb
- Add a new cache for
~/.bun
- Replace
npx
calls withbun
calls
bun install cypress
does not run the postinstall script, so you would also need to run bun cypress install
manually.
I haven't seen any feedback from the Cypress team how they see Bun and I don't see any official support from Cypress for Bun either, so I would be cautious about using this in production however.
In order for Bun to be integrated into cypress-io/github-action
I would expect the following checklist items to all be checked off. The community could ignore the checklist and submit a PR and the Cypress team could decide to accept it. (I don't get to take this decision. It's just my opinion.)
OS Support
- [X] Ubuntu
- [x] Windows native (not WSL2)
- [X] macOS
Node.js
- [ ] Full implementation of Node.js API by Bun
GitHub Actions Support
- [ ] Bun Callable from GitHub Actions runs using
- [ ] Bun Shipped with GitHub Actions Runner Images
Cypress Support
- [ ] Bun supported by Cypress
- [ ] Bun use by Cypress documented
- [ ] Cypress Docker images include Bun (base, browsers, included)
If somebody wants to use Bun with GitHub Actions, they can use the workflow .github/workflows/single.yml from the demo repo cypress-io/cypress-example-kitchensink as a template (which does not rely on
cypress-io/github-action
).
- Replace
actions/setup-node@v3
bynpm install -g bun
- Change the cache lockfile from
package-lock.json
tobun.lockb
- Add a new cache for
~/.bun
- Replace
npx
calls withbun
calls
bun install cypress
does not run the postinstall script, so you would also need to runbun cypress install
manually.I haven't seen any feedback from the Cypress team how they see Bun and I don't see any official support from Cypress for Bun either, so I would be cautious about using this in production however.
@MikeMcC399 Thank you for this, I greatly appreciate it!
@MikeMcC399 Yeah, it seems a little early for full Bun support. I guess I was under the impression that the infra behind Github Actions already supported it and Cypress was playing catch-up. I think it makes sense (if Cypress cares) to add an experimental Cypress Bun image but should in no way be ready for production with Windows support from the core bun team being so far behind.
IMO Bun is here to stay and some of us are using it, and will be nice if Cypress follow :-)
@h2oearth
IMO Bun is here to stay and some of us are using it, and will be nice if Cypress follow :-)
You should consider opening a feature request against Cypress on its issue list. Apparently nobody has made this suggestion so far.
The feature request here is for support of Bun by cypress-io/github-action
which is only a small part of what would have to be done.
Will do @MikeMcC399 , cheers
@h2oearth can you refer to the feature request created - as would also like to see Cypress support bun - especially including a version in Docker that supports it - I am looking at migrating an app that uses to Cypress from npm to bun - as this may be a blocker.
@MarkAPhillips
I cannot see any feature request for Bun in the
so if you decided to submit a request yourself, you would not be duplicating any existing request.
- There is a compatibility issue between Bun
1.0.25
and Cypress13.6.4
in that Bun fails to complete the Cypress postinstall script (effectivelybun cypress install
) if Node.js is not installed (see issue https://github.com/oven-sh/bun/issues/8658). This is not noticeable in a GitHub Actions environment because all GitHub Actions Runner Images have Node.js installed. The Cypress GitHub Action cypress-io/github-action entirely relies on Node.js, therefore it is not an issue with this action at this time, and for the foreseeable future.
- There still has not been any clean, simple request to the
cypress
issue list for Cypress to officially support Bun. This would need to come from somebody who wants it. Resolution of https://github.com/oven-sh/bun/issues/8658 by Bun would be a prerequisite, I imagine.
- Closing this feature request in favor of https://github.com/cypress-io/cypress/issues/28962. Please follow development in this main feature request.