@@ -113322,7 +113322,7 @@ const run = async (isLocal) => {
113322113322 : undefined;
113323113323 if (createComment)
113324113324 (0, comment_1.postComment)(octokit, comment, github_1.context);
113325- await (0, push_1.push)();
113325+ await (0, push_1.push)(exports.COVERAGE_DIR );
113326113326 if (analyzeStr?.error || testStr?.error || coverageStr?.error) {
113327113327 (0, core_1.setFailed)(`${analyzeStr?.output}\n${testStr?.output}\n${coverageStr?.output}`);
113328113328 }
@@ -113687,6 +113687,7 @@ const artifact_1 = __nccwpck_require__(26984);
113687113687const core_1 = __nccwpck_require__(72614);
113688113688const core_2 = __nccwpck_require__(72614);
113689113689const adm_zip_1 = __importDefault(__nccwpck_require__(98154));
113690+ const runTests_1 = __nccwpck_require__(99054);
113690113691const ARTIFACT_NAME = "coverage";
113691113692/**
113692113693 * Retrieve previous coverage report from the base branch
@@ -113768,13 +113769,21 @@ exports.retrievePreviousCoverage = retrievePreviousCoverage;
113768113769const generatePreviousCoverage = async (prev_sha, current_branch, coverage_directory) => {
113769113770 const artifact = new artifact_1.DefaultArtifactClient();
113770113771 await (0, exec_1.exec)(`git checkout ${prev_sha}`);
113771- await (0, exec_1.exec)(`flutter test --coverage --coverage-path ${coverage_directory}/lcov.info`);
113772- const report = await (0, utils_1.importLcov)(coverage_directory);
113773- const { id, size } = await artifact.uploadArtifact(ARTIFACT_NAME + "-" + prev_sha, [`${coverage_directory}/${utils_1.COV_FILE}`], ".", {});
113774- (0, core_2.debug)(`Artifact uploaded with id: ${id} and size: ${size}`);
113775- await (0, exec_1.exec)(`git reset --hard`);
113776- await (0, exec_1.exec)(`git checkout ${current_branch}`);
113777- return report;
113772+ let report;
113773+ try {
113774+ await (0, runTests_1.getTest)(coverage_directory);
113775+ report = await (0, utils_1.importLcov)(coverage_directory);
113776+ const { id, size } = await artifact.uploadArtifact(ARTIFACT_NAME + "-" + prev_sha, [`${coverage_directory}/${utils_1.COV_FILE}`], ".", {});
113777+ (0, core_2.debug)(`Artifact uploaded with id: ${id} and size: ${size}`);
113778+ }
113779+ catch (e) {
113780+ console.error("Failed to run tests");
113781+ }
113782+ finally {
113783+ await (0, exec_1.exec)(`git reset --hard`);
113784+ await (0, exec_1.exec)(`git checkout ${current_branch}`);
113785+ return report;
113786+ }
113778113787};
113779113788
113780113789
@@ -113794,7 +113803,7 @@ const core_2 = __nccwpck_require__(72614);
113794113803/**
113795113804 * Push changes to the branch
113796113805 */
113797- const push = async () => {
113806+ const push = async (coverageDirectory ) => {
113798113807 (0, core_1.startGroup)("Check for changes");
113799113808 let stdout = "";
113800113809 try {
@@ -113812,7 +113821,7 @@ const push = async () => {
113812113821 (0, core_1.startGroup)("Push changes");
113813113822 await (0, exec_1.exec)('git config --global user.name "github-actions"');
113814113823 await (0, exec_1.exec)('git config --global user.email "
[email protected] "');
113815- await (0, exec_1.exec)(" git add -A" );
113824+ await (0, exec_1.exec)(` git add -A -- ':!${coverageDirectory}` );
113816113825 (0, child_process_1.execSync)(`git commit -m 'chore(automated): Lint commit and format' `);
113817113826 await (0, exec_1.exec)("git push -f");
113818113827 (0, core_2.debug)("Changes pushed onto branch");
0 commit comments