readseek 0.5.14

structural source reader with stable line hashes
name: CI

on:
  push:
  pull_request:

env:
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-2025]

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

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: clippy, rustfmt
          targets: x86_64-pc-windows-msvc

      - name: Build
        run: cargo build

      - name: Test (unit)
        run: cargo test

      - name: Clippy
        run: cargo clippy --all-targets --all-features

      - name: Check Windows target
        if: runner.os == 'Windows'
        run: cargo check --target x86_64-pc-windows-msvc

      - name: Clippy Windows target
        if: runner.os == 'Windows'
        run: cargo clippy --target x86_64-pc-windows-msvc --all-targets --all-features

      - name: Format check
        run: cargo fmt --check

  pi-readseek:
    name: Test pi-readseek
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: packages/pi-readseek

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

      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: npm
          cache-dependency-path: packages/pi-readseek/package-lock.json

      - name: Install local readseek packages
        working-directory: .
        run: |
          npm install --package-lock=false --ignore-scripts ./npm/linux-x64
          npm install --prefix packages/pi-readseek --package-lock=false --ignore-scripts ./

      - name: Type check
        run: npm run typecheck

      - name: Test
        run: npm test