fix: enable mouse scrolling in pager mode (#198) #218
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Main CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| - "docs/**" | |
| - "assets/**" | |
| - "LICENSE" | |
| env: | |
| SKIP_INSTALL_SIMPLE_GIT_HOOKS: "1" | |
| concurrency: | |
| group: main-ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| name: Typecheck + tests | |
| 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: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Format check | |
| run: bun run format:check | |
| - name: Lint | |
| run: bun run lint | |
| - name: Typecheck | |
| run: bun run typecheck | |
| - name: Test suite | |
| run: bun run test | |
| - name: PTY integration tests | |
| run: bun run test:integration | |
| tty-smoke: | |
| name: Terminal smoke tests | |
| 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: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Verify terminal tools | |
| run: | | |
| command -v script | |
| command -v timeout | |
| - name: TTY smoke tests | |
| run: bun run test:tty-smoke | |
| pack-npm: | |
| name: Verify npm package | |
| 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: 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' | |
| prebuilt-npm: | |
| name: Verify prebuilt npm package (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-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: 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 | |
| build-bin: | |
| name: Build compiled binary | |
| 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: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build binary | |
| run: bun run build:bin | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hunk-linux-binary | |
| path: dist/hunk | |
| if-no-files-found: error |