-
Notifications
You must be signed in to change notification settings - Fork 751
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
Generalized Runtime Docs / (First round) Bun Support #3219
base: master
Are you sure you want to change the base?
Changes from all commits
4d40116
e8a4ee4
9a6f9e3
65de309
282970a
705df72
fdd9946
43f245a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,83 @@ | ||||||
name: Bun Support | ||||||
#on: | ||||||
# schedule: | ||||||
# - cron: 0 0 * * * | ||||||
# workflow_dispatch: | ||||||
|
||||||
on: | ||||||
push: | ||||||
branches: [master, develop] | ||||||
tags: ['*'] | ||||||
pull_request: | ||||||
types: [opened, reopened, synchronize] | ||||||
workflow_dispatch: | ||||||
|
||||||
jobs: | ||||||
tests: | ||||||
runs-on: ubuntu-latest | ||||||
strategy: | ||||||
fail-fast: false | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
with: | ||||||
submodules: recursive | ||||||
- uses: oven-sh/setup-bun@v1 | ||||||
|
||||||
- run: bunx ci --omit=peer | ||||||
|
||||||
- name: Test Block | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/block | ||||||
|
||||||
- name: Test Blockchain | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/blockchain | ||||||
|
||||||
# Client not working yet in Bun (expected), 2024-01-08 | ||||||
# - name: Test Client | ||||||
# run: bunx vitest run test | ||||||
# working-directory: packages/client | ||||||
|
||||||
- name: Test Common | ||||||
run: bunx vitest run test | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is actually using bun. Because vitest is an executable bun should default to using node here. I think you need to pass in the
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docs on this are here https://bun.sh/docs/cli/run#bun There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, that is the "tip of the year"! 🙏 🙂 I was already wondering why things are so smooth. 😂 That is the missing link I needed! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to note that this is not yet working (using bun 1.0.26). Tested with Not dropping here for you to debug, might just be our homework to do with the bun updates adjusting our code base. But just to drop the information here. |
||||||
working-directory: packages/common | ||||||
|
||||||
- name: Test Devp2p | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/devp2p | ||||||
|
||||||
- name: Test Ethash | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/ethash | ||||||
|
||||||
- name: Test EVM | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/evm | ||||||
|
||||||
- name: Test RLP | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/rlp | ||||||
|
||||||
- name: Test StateManager | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/statemanager | ||||||
|
||||||
- name: Test Trie | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/trie | ||||||
|
||||||
- name: Test Tx | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/tx | ||||||
|
||||||
- name: Test Util | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/util | ||||||
|
||||||
- name: Test VM | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/vm | ||||||
|
||||||
- name: Test Wallet | ||||||
run: bunx vitest run test | ||||||
working-directory: packages/wallet |
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.
Might want to pin the version so there is no ambiguity if a pr caused a regression or bun version changed it.
Alternatively consider just echoing the bun version in the next step of this test so if you are debugging a workflow you know exactly which version of bun it used