xarf-rs 0.1.4

XARF v4 (eXtended Abuse Reporting Format) parser, validator, and generator with v3 compatibility
Documentation
name: Coverage

# Generates an lcov coverage report with `cargo-llvm-cov` and uploads it to
# Codecov for line-coverage tracking. Runs on PRs and pushes to `main` so
# the trend graph stays current and PRs can be reviewed with a coverage
# delta in the diff.
#
# ## Set-up checklist (one-time)
#
# 1. Sign in to https://codecov.io with the GitHub org and enable this repo.
# 2. Codecov for OSS public repos does not require a token; for private
#    repos add a `CODECOV_TOKEN` secret from the project settings.

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

jobs:
  coverage:
    name: cargo-llvm-cov
    runs-on: ubuntu-latest
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@cargo-llvm-cov
      - name: Generate coverage report
        # `--workspace` covers every crate in the workspace (only one for now).
        # `--all-features` exercises every feature flag — currently a no-op
        # since we have no features, but future-proof.
        # `--lcov` emits a format Codecov understands.
        # `--ignore-filename-regex` hides perf_budgets.rs from the report; the
        # `--skip` args below also prevent its tests from *running*, since
        # they assert wall-clock budgets that llvm-cov's instrumentation
        # overhead can blow on shared runners. Every perf_budgets test name
        # contains `_under_` or `_target_`; no other test uses those tokens.
        run: |
          cargo llvm-cov --workspace --all-features --locked \
            --ignore-filename-regex 'tests/perf_budgets\.rs' \
            --lcov --output-path lcov.info \
            -- --skip _under_ --skip _target_
      - name: Upload to Codecov
        uses: codecov/codecov-action@v4
        with:
          files: lcov.info
          fail_ci_if_error: false
          token: ${{ secrets.CODECOV_TOKEN }}