Skip to content
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

Add CI check for Bun runtime #86

Merged
merged 13 commits into from
Sep 20, 2023
Merged

Add CI check for Bun runtime #86

merged 13 commits into from
Sep 20, 2023

Conversation

PetrHeinz
Copy link
Member

@PetrHeinz PetrHeinz commented Sep 19, 2023

Supporting Bun in our test pipeline would be a bit hard, even if we'd skip some irrelevant use cases (particularly Browser). Mocking requests via nock doesn't seem to work properly and there are some other failures because of the testing environment.

If we wanted to go that way, I'd recommend having a configurable fetch callback in options that we could rewrite with our own mocked method. This should allow us to drop nock completely.


I tested our example-project in Bun and it was buildable and worked out of the box. Added end-to-end tests for all supported environments (Node and Bun).

Created a new source E2E test for logtail/logtail-js and added it's source token into repository secrets.

E2E tests cannot be meaningfully run on branches, since they're downloading released @logtail/*dependencies. For this reason I've opted for running it on master pushes, every Monday at 5:20 am, and possibly manually.

WDYT?

@PetrHeinz PetrHeinz marked this pull request as ready for review September 19, 2023 14:33
@PetrHeinz
Copy link
Member Author

It would be nice to see which runtime/version was used in Better Stack (e.g. env.runtime: "Bun 1.0.3")...

@PetrHeinz
Copy link
Member Author

Beautiful 🙂

image

@PetrHeinz PetrHeinz merged commit 2a1d525 into master Sep 20, 2023
4 checks passed
@PetrHeinz PetrHeinz deleted the ph/test-bun-runtime branch September 20, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants