Skip to content

Structure

CoverageAction

Reads and summarizes native coverage artifacts produced by a prior test run.

struct CoverageAction

Overview

ShipItSwifty does not generate coverage data itself — it wraps and normalises the artifacts that your platform toolchain already produces:

  • iOS: .xcresult bundles created by xcodebuild test -enableCodeCoverage YES

  • Android: JaCoCo XML reports generated by Gradle’s jacocoTestReport task

Usage

// iOS — infer xcresult from config
let result = try await CoverageAction().run(
    with: .init(firstPartyOnly: true, format: .text),
    context: context
)
print("Overall: \(result.overallLineCoverage)%")

// Android — explicit report path
let result = try await CoverageAction().run(
    with: .init(reportPath: "./app/build/reports/jacoco/test/jacocoTestReport.xml"),
    context: androidContext
)
for module in result.modules { print("\(module.name): \(module.lineCoverage)%") }

Topics

Configuration

Results

Initializers

Type Properties

Default Implementations

Relationships

Conforms To

  • Action
  • Swift.Sendable
  • Swift.SendableMetatype