to-html 0.2.0

Render a terminal with ANSI colors as HTML
name: Test

on:
  push:
    branches:
      - main
  pull_request:
  schedule:
    # Run monthly to keep Rust toolchain changes fresh
    - cron: "0 0 1 * *"

jobs:
  lint:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        channel: [stable, beta]
    steps:
      - name: Install ${{ matrix.channel }} toolchain
        run: |
          rustup toolchain install ${{ matrix.rust }} --profile minimal --component clippy,rustfmt
          rustup default ${{ matrix.rust }}
      - name: Checkout
        uses: actions/checkout@v6
      - name: Run `cargo fmt`
        run: |
          cargo fmt --all -- --check
      - name: Run `cargo clippy`
        run: |
          cargo clippy -- -D warnings

  test:
    needs: lint
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        channel: [stable, beta]
        os: [ubuntu-latest, macos-latest]
    steps:
      - name: Install ${{ matrix.channel }} toolchain
        run: |
          rustup toolchain install ${{ matrix.rust }} --profile minimal
          rustup default ${{ matrix.rust }}
      - name: Checkout
        uses: actions/checkout@v6
      - name: Build and run tests
        run: |
          cargo test --workspace
          cargo bench -p ansi-to-html --profile dev -- --test

  fuzz:
    needs: lint
    runs-on: ubuntu-latest
    steps:
      - name: Install nightly toolchain
        run: |
          rustup toolchain install nightly --profile minimal
          rustup default nightly
      - name: Checkout
        uses: actions/checkout@v6
      # Run the fuzzer for a minute
      - name: Run fuzzers
        run: |
          cargo install cargo-fuzz
          cargo --locked fuzz run --jobs=4 --fuzz-dir=crates/ansi-to-html/fuzz opt_equiv -- -max_total_time=60 -timeout=30