manasight-parser 0.5.3

MTG Arena log file parser — reads Player.log and emits typed game events
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    types: [opened, synchronize, ready_for_review, reopened]

permissions:
  contents: read

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

jobs:
  check:
    name: Lint & Test
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1

      - name: Pre-commit checks
        run: make -j precommit

  test-no-default-features:
    name: Test (--no-default-features)
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1

      # Exercises the feature-off rollback path so it cannot bit-rot.
      # The `brace_depth_flush` feature is default-on; this job protects
      # the fallback "flush on next header" behavior that ships if the
      # feature is disabled (issue #193 reversibility insurance).
      - name: Run tests with default features disabled
        run: cargo test --no-default-features

  wasm-check:
    name: WASM build check
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1

      - name: Add wasm32 target
        run: rustup target add wasm32-unknown-unknown

      # Verify that the sync/WASM-compatible subset compiles to wasm32.
      # Uses --no-default-features to exclude tokio/known-folders (tailer feature),
      # keeping only the pure-Rust core: LineBuffer, Router, parsers, parse_whole_log.
      - name: cargo check (wasm32-unknown-unknown)
        run: cargo check --target wasm32-unknown-unknown --no-default-features --features brace_depth_flush

      # Also verify that the wasm feature (adds wasm-bindgen exports) compiles.
      - name: cargo check wasm feature (wasm32-unknown-unknown)
        run: cargo check --target wasm32-unknown-unknown --no-default-features --features wasm

  wasm-smoke:
    name: WASM smoke test (Node)
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1

      - name: Add wasm32 target
        run: rustup target add wasm32-unknown-unknown

      # wasm-pack is new CI tooling introduced by this issue (#825).
      # It installs wasm-bindgen-cli internally and drives the full
      # wasm-bindgen test pipeline against the Node.js target.
      - name: Install wasm-pack
        run: cargo install wasm-pack --locked --version 0.15.0

      # Run wasm-bindgen-test suite on Node.js.
      # tests/wasm_smoke.rs is gated with #![cfg(target_arch = "wasm32")]
      # so it compiles to nothing on the host and only executes here.
      # Asserts: parse_whole_log_js(fixture) == parse_whole_log(fixture) (native parity).
      - name: Run wasm smoke tests (Node)
        run: wasm-pack test --node -- --no-default-features --features wasm

  deny:
    name: cargo deny
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Check licenses and advisories
        uses: EmbarkStudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe # v2