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
4 changes: 3 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Benchmarks

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

concurrency:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: CI
name: Main CI

on:
push:
branches:
- master
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
group: main-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
pull_request:

concurrency:
group: pr-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pr-validate:
name: Typecheck + Test + Smoke
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Typecheck
run: bun run typecheck

- name: Test suite
run: bun test

- name: Verify terminal tools
run: |
command -v script
command -v timeout

- name: TTY smoke tests
run: bun run test:tty-smoke

- name: Build npm runtime bundle
run: bun run build:npm

- name: Verify npm pack output
run: bun run check:pack

- name: Simulate global npm install
run: |
pkg_dir="$(mktemp -d)"
install_dir="$(mktemp -d)"
node_dir="$(dirname "$(command -v node)")"
npm pack --pack-destination "$pkg_dir" >/dev/null
pkg="$(find "$pkg_dir" -maxdepth 1 -name 'hunkdiff-*.tgz' | head -n1)"
npm install -g --prefix "$install_dir" "$pkg"
PATH="$install_dir/bin:$node_dir:/usr/bin:/bin"
if command -v bun >/dev/null 2>&1; then
echo "bun unexpectedly available on the sanitized PATH" >&2
exit 1
fi
hunk --help | grep 'Usage: hunk'

- name: Stage prebuilt npm packages
run: bun run build:prebuilt:npm

- name: Verify staged prebuilt packs
run: bun run check:prebuilt-pack

- name: Smoke test prebuilt global install
run: bun run smoke:prebuilt-install
Loading