Files
orca/.github/workflows/pr.yml
T
Jinwoo-HandOrca 4179d3d347 fix(ci): rebuild better-sqlite3 for Node before tests
postinstall rebuilds native modules for Electron's ABI, but vitest
runs under system Node.js. Add an explicit rebuild step so
orchestration tests can load the better-sqlite3 native module.

Co-authored-by: Orca <help@stably.ai>
2026-04-27 23:46:55 -04:00

61 lines
1.5 KiB
YAML

name: PR Checks
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install native build tools
run: sudo apt-get update && sudo apt-get install -y build-essential python3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm exec oxlint --format github
- name: Typecheck
run: pnpm typecheck
# Why: postinstall rebuilds better-sqlite3 for Electron's ABI via
# @electron/rebuild, but vitest runs under system Node.js. Rebuild
# it for Node so orchestration tests can load the native module.
- name: Rebuild better-sqlite3 for Node
run: pnpm rebuild better-sqlite3
- name: Test
run: pnpm test
- name: Build
run: pnpm build
e2e:
uses: ./.github/workflows/e2e.yml
# Why: check out the PR head directly instead of refs/pull/N/merge.
# The merge ref doesn't exist when the PR has conflicts or GitHub
# hasn't computed the merge commit yet, causing checkout to fail
# for reasons unrelated to the code under test.
with:
ref: ${{ github.event.pull_request.head.sha }}