Skip to content

Commit

Permalink
Merge pull request tscircuit#5 from tscircuit/sev1
Browse files Browse the repository at this point in the history
Add Workflows, Fix Test, Publish v0.0.1
  • Loading branch information
seveibar authored Nov 30, 2024
2 parents f222a54 + ce4bc27 commit c38fab6
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/bun-formatcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
name: Format Check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
format-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run format check
run: bun run format:check
25 changes: 25 additions & 0 deletions .github/workflows/bun-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
name: Bun Test

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run tests
run: bun test
26 changes: 26 additions & 0 deletions .github/workflows/bun-typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
name: Type Check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
type-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun i

- name: Run type check
run: bunx tsc --noEmit
2 changes: 2 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ export const createCircuitWebWorker = async (

// TODO set up listeners to track render state

console.log(webWorker)

return webWorker as any
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "eval-webworker",
"name": "@tscircuit/eval-webworker",
"main": "dist/lib/index.js",
"version": "0.0.1",
"type": "module",
"scripts": {
"build": "tsup-node ./lib/index.ts ./webworker/index.ts --format esm --sourcemap"
"build": "tsup-node ./lib/index.ts ./webworker/index.ts --format esm --sourcemap",
"format": "biome format --write .",
"format:check": "biome format ."
},
"devDependencies": {
"@babel/standalone": "^7.26.2",
Expand Down
2 changes: 1 addition & 1 deletion tests/example1-readme-example.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createCircuitWebWorker } from "lib"
import { expect, test } from "bun:test"

test("example1-readme-example", async () => {
const circuitWebWorker = createCircuitWebWorker({
const circuitWebWorker = await createCircuitWebWorker({
webWorkerUrl: new URL("../webworker/index.ts", import.meta.url),
})

Expand Down

0 comments on commit c38fab6

Please sign in to comment.