diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6290912..0a80352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + lfs: true - run: rustup toolchain install stable --profile minimal --no-self-update - uses: Swatinem/rust-cache@v2 diff --git a/core/src/parsers/pyreport/chunks.rs b/core/src/parsers/pyreport/chunks.rs index ddbfb2c..ab569b6 100644 --- a/core/src/parsers/pyreport/chunks.rs +++ b/core/src/parsers/pyreport/chunks.rs @@ -46,6 +46,8 @@ use serde::{de, Deserialize}; use super::report_json::ParsedReportJson; use super::utils; use crate::error::CodecovError; +#[cfg(doc)] +use crate::report::models; use crate::report::pyreport::types::{ self, CoverageType, MissingBranch, Partial, PyreportCoverage, ReportLine, }; diff --git a/core/src/parsers/pyreport/mod.rs b/core/src/parsers/pyreport/mod.rs index baee7f0..3b07289 100644 --- a/core/src/parsers/pyreport/mod.rs +++ b/core/src/parsers/pyreport/mod.rs @@ -3,6 +3,8 @@ use std::fs::File; use memmap2::Mmap; use crate::error::Result; +#[cfg(doc)] +use crate::report::models; use crate::report::SqliteReportBuilder; pub mod chunks; @@ -18,14 +20,14 @@ mod utils; /// - Chunks file, which describes line-by-line coverage data for each file /// /// The parser for the report JSON inserts a -/// [`crate::report::models::SourceFile`] for each file -/// and a [`crate::report::models::Context`] for each session. It returns two +/// [`SourceFile`](models::SourceFile) for each file +/// and a [`Context`](models::Context) for each session. It returns two /// hashmaps: one which maps each file's "chunk index" to the database PK for -/// the `SourceFile` that was inserted for it, and one which maps each session's +/// the [`SourceFile`](models::SourceFile) that was inserted for it, and one which maps each session's /// "session_id" to the database PK for the `Context` that was inserted for it. /// /// The parser for the chunks file inserts a -/// [`crate::report::models::CoverageSample`] (and possibly other records) for +/// [`CoverageSample`](models::CoverageSample) (and possibly other records) for /// each coverage measurement contained in the chunks file. It uses the /// results of the report JSON parser to figure out the appropriate FKs to /// associate a measurement with its `SourceFile` and `Context`(s).