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 tests for Bun & Small tweaks #1814

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/cuddly-peas-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@whatwg-node/node-fetch': patch
'@whatwg-node/server': patch
---

Small improvements for Bun support
14 changes: 1 addition & 13 deletions .github/workflows/deployment-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
plan:
[
'aws-lambda',
'azure-function',
'cloudflare-workers',
'cloudflare-modules',
'deno',
'bun',
]
plan: ['aws-lambda', 'azure-function', 'cloudflare-workers', 'cloudflare-modules', 'deno']
# TODO: Add vercel
name: e2e / ${{ matrix.plan }}

Expand All @@ -41,10 +33,6 @@ jobs:
with:
deno-version: vx.x.x

- name: Use Bun
if: matrix.plan == 'bun'
uses: oven-sh/setup-bun@v2

- name: Cache Node Modules
uses: actions/cache@v4
id: node-modules-cache-deployment-e2e
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,35 @@ jobs:
max_attempts: 5
command: yarn test --ci

unit-bun:
name: unit / bun ${{matrix.node-version}}
runs-on: ubuntu-latest
services:
httpbin:
image: kennethreitz/httpbin
ports:
- 8888:80
strategy:
fail-fast: false
steps:
- name: Checkout Master
uses: actions/checkout@v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
- name: Cache Jest
uses: actions/cache@v4
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node-version}}-jest-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.node-version}}-jest-
- name: Test
run: yarn test:bun --ci

unit-leaks:
name: unit / leaks / node ${{matrix.node-version}}
runs-on: ubuntu-latest
Expand Down
Loading
Loading