Skip to content

Commit

Permalink
feat: Test using Bun
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Mar 3, 2024
1 parent b8af26b commit 4f5fbb0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@ jobs:

- name: Run integration tests
run: deno test --allow-net integration.ts

test-bun:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Start MinIO for integration tests
run: docker run --name minio --detach -e MINIO_ROOT_USER=AKIA_DEV -e MINIO_ROOT_PASSWORD=secretkey -e MINIO_REGION_NAME=dev-region -p 9000:9000 -p 9001:9001 --entrypoint /bin/sh minio/minio:RELEASE.2021-10-23T03-28-24Z -c 'mkdir -p /data/dev-bucket && minio server --console-address ":9001" /data'
# TODO: can we get jsr to load the dependency versions from deno.jsonc?
- name: Install dependencies
run: bunx jsr add @std/io @std/assert
- name: Convert integration test from Deno to Bun test runner
run: '(echo -e ''import { test } from "bun:test";\nconst Deno = { test: ({fn}: {fn: () => void, name: string}) => test(fn) };''; cat integration.ts ) > integration-bun.ts'
- name: Run integration tests with bun
run: bun test ./integration-bun.ts

0 comments on commit 4f5fbb0

Please sign in to comment.