Skip to content
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
44 changes: 44 additions & 0 deletions .github/workflows/pr-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PR Tests

on:
pull_request:
branches: [ main ]
paths:
- 'packages/pdf-processor/**'

jobs:
test:
runs-on: ubuntu-latest

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

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies and typecheck
run: |
cd packages/pdf-processor
bun install
bun tsc --noEmit

- name: Build package
run: |
cd packages/pdf-processor
bun build src/index.ts --outdir dist --format esm --target node --external mammoth --external turndown --external jszip
bun tsc --project tsconfig.build.json

- name: Run tests
run: |
cd packages/pdf-processor
bun test
env:
EK_MISTRAL_API_KEY: ${{ secrets.EK_MISTRAL_API_KEY }}
Binary file added packages/pdf-processor/data/receipt.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions packages/pdf-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build": "bun run clean && bun run build:esm && bun run build:types",
"build:esm": "bun build src/index.ts --outdir dist --format esm --target node --external sharp --external ghostscript-node --external @ai-sdk/openai --external ai --external ollama-ai-provider --external pino --external zod",
"build:types": "bun tsc --project tsconfig.build.json",
"typecheck": "bun tsc --noEmit",
"test": "bun test",
"prepublishOnly": "bun run build",
"clean": "rm -rf dist"
Expand Down
Loading
Loading