markdoc 0.1.0

Rust implementation of the Markdoc document language (CommonMark plus a {% tag %} extension)
Documentation
# CI for markdoc
#
# Pure-Rust library crate, no FFI, no path dependencies. Runs fmt,
# clippy and tests on Linux — no need for a multi-OS matrix since
# nothing platform-specific is exercised.

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: short

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cargo cache
        uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}

      - name: cargo fmt --check
        run: cargo fmt --all --check

      - name: cargo clippy
        run: cargo clippy --all-targets -- -D warnings

      # Before the tests, so an edit to the corpus that also edits the hash
      # the conformance test checks it against fails here, by name.
      - name: The vendored conformance corpus is upstream's, byte for byte
        run: tests/marktest/verify-vendored.sh

      # Includes tests/conformance.rs: upstream Markdoc's own corpus, held as
      # a ratchet against tests/conformance-baseline.txt.
      - name: cargo test
        run: cargo test --all-targets

      - name: cargo doc
        env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --no-deps