Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keichan34 committed Jan 5, 2025
1 parent 55b396f commit b479916
Show file tree
Hide file tree
Showing 18 changed files with 620 additions and 26 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CICD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '22'

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test
3 changes: 2 additions & 1 deletion index.node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export type Context = unknown;

export function new_ctx(): Context;
export function db_add(ctx: Context, label: string, data: Uint8Array): undefined;
export function stream_next(ctx: Context): Promise<{value: any} | {done: true}>;
export type StreamValue = { label: string, score: number };
export function stream_next(ctx: Context): Promise<{value: StreamValue, done: boolean}>;
export function stream_write(ctx: Context, data: Uint8Array): undefined;
export function stream_close(ctx: Context): undefined;
Loading

0 comments on commit b479916

Please sign in to comment.