rfheadless 0.1.0

A headless browsing engine API for Rust
Documentation
name: Platform API Tests

on:
  workflow_dispatch:

jobs:
  platform-tests:
    name: Run platform API tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
      - name: Run unit tests
        run: cargo test --lib -q

  platform-smoke:
    name: Platform smoke tests (node harness check)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '18'
      - name: Quick JS syntax check (rf_harness)
        run: |
          python3 - <<'PY'
          import sys, json
          from pathlib import Path
          s=Path('src/rf_harness.js').read_text()
          s=s.replace('__RFOX_ELEMENTS__','[]').replace('__RFOX_STYLES__','[]').replace('__RFOX_TITLE__','"Title"').replace('__RFOX_BODY__','"Body"')
          Path('tmp_harness.js').write_text(s)
          PY
          node tmp_harness.js || true

  chrome-comparisons:
    name: Chrome comparisons (manual / gated)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Rust and Chrome
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - name: Build with CDP feature
        run: cargo build --release --features cdp
      - name: Note
        run: echo "This job is a placeholder for Chrome comparison steps; set RUN_CHROMIUM_COMPARISONS=1 to enable and ensure Chrome is available."