Skip to content

Commit bdb334b

Browse files
fix: Pass correct coverage path for generating previous test results (#27)
1 parent b77cf7b commit bdb334b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113426,7 +113426,7 @@ exports.retrievePreviousCoverage = retrievePreviousCoverage;
113426113426
const generateOldCoverage = async (prev_sha, current_sha, coverage_directory) => {
113427113427
const artifact = new artifact_1.DefaultArtifactClient();
113428113428
await (0, exec_1.exec)(`git checkout ${prev_sha}`);
113429-
await (0, exec_1.exec)("flutter test --coverage");
113429+
await (0, exec_1.exec)(`flutter test --coverage --coverage-path ${coverage_directory}/lcov.info`);
113430113430
const report = await (0, utils_1.importLcov)(coverage_directory);
113431113431
const { id, size } = await artifact.uploadArtifact(ARTIFACT_NAME + "-" + prev_sha, [`${coverage_directory}/${utils_1.COV_FILE}`], ".", {});
113432113432
(0, core_2.debug)(`Artifact uploaded with id: ${id} and size: ${size}`);

src/scripts/prevCoverage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const generateOldCoverage = async (
9393
): Promise<Lcov> => {
9494
const artifact = new DefaultArtifactClient();
9595
await exec(`git checkout ${prev_sha}`);
96-
await exec("flutter test --coverage");
96+
await exec(`flutter test --coverage --coverage-path ${coverage_directory}/lcov.info`);
9797
const report = await importLcov(coverage_directory);
9898
const { id, size } = await artifact.uploadArtifact(
9999
ARTIFACT_NAME + "-" + prev_sha,

0 commit comments

Comments
 (0)