Skip to content

ops: add coverage + security audit + docs-site build check to CI #80

Closed

Description

@unhappychoice

Tracks #76 (0.x release scope).

Background

Today's CI (.github/workflows/ci.yml) only runs format / clippy / test (3 OSes). To credibly ship "CI/CD complete" in 0.x, these are missing:

  • Test coverage — no tooling in place.
  • Dependency security audit — no cargo-audit / cargo-deny.
  • docs-site build check — docs.yml is push-only, so PRs that break docs don't fail.

Jobs to add

1. Coverage (cargo-llvm-cov + codecov)

  • Measure line / branch coverage via cargo-llvm-cov (cargo llvm-cov --lcov --output-path lcov.info).
  • Post codecov diff comment on PRs (codecov/codecov-action@v4).
  • No threshold gate initially (warning only). Once stable, gate via --fail-under-lines 70 or similar.
  • One OS (ubuntu-latest) is enough — no matrix needed.

2. Security audit

  • cargo audit against the RustSec advisory DB.
    • Fails on known vulnerabilities.
    • Weekly cron (schedule: cron: "0 0 * * 1") + per-PR run.
  • Optional: cargo-deny for license / duplicate checks.

3. docs-site build check

On PRs touching docs-site/, or every PR:

  • Run pnpm --filter docs-site build (or npm equivalent).
  • Fail on Starlight dead-link errors / TypeScript errors.
  • Keep the existing docs.yml (push-on-main). Add a separate job for PR validation.

Implementation sketch

Three jobs added to .github/workflows/ci.yml:

coverage:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: llvm-tools-preview
    - uses: taiki-e/install-action@cargo-llvm-cov
    - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
    - uses: codecov/codecov-action@v4
      with:
        files: lcov.info

audit:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - uses: rustsec/audit-check@v2
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

docs-build:
  runs-on: ubuntu-latest
  defaults:
    run:
      working-directory: docs-site
  steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: 20
    - run: npm ci
    - run: npm run build

Definition of Done

  • Add coverage job; upload to codecov
  • Add codecov badge to README
  • Add audit job (PR + weekly cron)
  • Add docs-build job (validates docs-site build on PRs)
  • Ship deny.toml if license / duplicate auditing is desired

Out of scope

  • Threshold gates (raise in stages later)
  • Benchmark CI

Activity

  1. added
    ops
    on Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ops

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions