diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b871b2e..db1b500 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - name: Install run: bun install - name: Test - run: bun test + run: bun run test # TODO: uncomment this when https://github.com/cloudflare/workers-sdk/issues/5082 is fixed # - name: Verify env # run: bun env:verify diff --git a/testRunner.ts b/testRunner.ts new file mode 100644 index 0000000..484ae6c --- /dev/null +++ b/testRunner.ts @@ -0,0 +1,13 @@ +import { $ } from "zx"; + +const tursoProcess = $`turso dev --port 3000`.nothrow(); + +process.env.TURSO_URL = "http://127.0.0.1:3000"; +process.env.TURSO_AUTH_TOKEN = "asd"; +await $`bun db:migrate`.nothrow(); +await $({ + verbose: true, + quote: (arg) => arg, +})`FORCE_COLOR=1 bun test ${process.argv.slice(2).join(" ")}`.nothrow(); + +await tursoProcess.kill("SIGINT");