mdcast 0.3.0

Markdown → DOCX/ODT/PDF/PPTX/HTML-reveal with per-page layout templates, powered by pandoc and typst
Documentation
name: CI

on:
  push:
    branches: [master]
  pull_request:

env:
  CARGO_BUILD_JOBS: 4

jobs:
  # Full verification gate on every PR: lint + all feature combos + all tests.
  test:
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install pandoc
        run: sudo apt-get update && sudo apt-get install -y pandoc

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

      - uses: Swatinem/rust-cache@v2

      - name: Lint (fmt + clippy)
        run: make lint

      - name: Check all feature combinations
        run: make check-all

      - name: Test
        run: make test

      - name: Test typst-html feature (issue #53's HTML export)
        run: make test-typst-html

      - name: Test remote-images feature (issue #54's http(s) image fetch)
        run: make test-remote-images

  # Coverage on every merge to master. Runs the full suite under llvm-cov, so
  # master stays verified without duplicating the PR job.
  coverage:
    if: github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install pandoc
        run: sudo apt-get update && sudo apt-get install -y pandoc

      - uses: dtolnay/rust-toolchain@stable

      - uses: taiki-e/install-action@cargo-llvm-cov

      - uses: Swatinem/rust-cache@v2
        with:
          # Coverage builds use different RUSTFLAGS — keep a separate cache.
          prefix-key: coverage

      - name: Coverage
        run: make coverage

      - name: Coverage summary
        run: |
          {
            echo '## Coverage'
            echo '```'
            cargo llvm-cov report --summary-only
            echo '```'
          } >> "$GITHUB_STEP_SUMMARY"

      - name: HTML report
        run: cargo llvm-cov report --html

      - name: Upload coverage artifact
        uses: actions/upload-artifact@v4
        with:
          name: coverage-report
          path: |
            lcov.info
            target/llvm-cov/html