@@ -113287,8 +113287,15 @@ const behind_1 = __nccwpck_require__(98890);
113287113287const push_1 = __nccwpck_require__(13662);
113288113288const prevCoverage_1 = __nccwpck_require__(39033);
113289113289const minimist_1 = __importDefault(__nccwpck_require__(13566));
113290+ const node_child_process_1 = __nccwpck_require__(17718);
113290113291exports.COVERAGE_DIR = ".coverage";
113291113292const run = async (isLocal) => {
113293+ try {
113294+ (0, node_child_process_1.execSync)("flutter pub get");
113295+ }
113296+ catch (e) {
113297+ console.error(e);
113298+ }
113292113299 try {
113293113300 const workingDirectory = isLocal ? "." : (0, core_1.getInput)("working-directory");
113294113301 // Check if the working directory is different from the current directory
@@ -113325,9 +113332,10 @@ const run = async (isLocal) => {
113325113332 : undefined;
113326113333 if (createComment)
113327113334 (0, comment_1.postComment)(octokit, comment, github_1.context);
113328- await (0, push_1.push)(exports.COVERAGE_DIR);
113329- if (analyzeStr?.error || testStr?.error || coverageStr?.error) {
113330- (0, core_1.setFailed)(`${analyzeStr?.output}\n${testStr?.output}\n${coverageStr?.output}`);
113335+ await (0, push_1.pushChanges)(exports.COVERAGE_DIR);
113336+ const errors = [analyzeStr, testStr, coverageStr].filter((step) => step?.error);
113337+ if (errors.length > 0) {
113338+ (0, core_1.setFailed)(errors.map((step) => step?.output).join("; "));
113331113339 }
113332113340 }
113333113341 catch (err) {
@@ -113806,15 +113814,15 @@ const generatePreviousCoverage = async (prev_sha, current_branch, coverage_direc
113806113814"use strict";
113807113815
113808113816Object.defineProperty(exports, "__esModule", ({ value: true }));
113809- exports.push = void 0;
113817+ exports.pushChanges = void 0;
113810113818const core_1 = __nccwpck_require__(72614);
113811113819const exec_1 = __nccwpck_require__(2259);
113812113820const child_process_1 = __nccwpck_require__(32081);
113813113821const core_2 = __nccwpck_require__(72614);
113814113822/**
113815113823 * Push changes to the branch
113816113824 */
113817- const push = async (coverageDirectory) => {
113825+ const pushChanges = async (coverageDirectory) => {
113818113826 (0, core_1.startGroup)("Check for changes");
113819113827 let stdout = "";
113820113828 try {
@@ -113863,7 +113871,7 @@ const push = async (coverageDirectory) => {
113863113871 }
113864113872 }
113865113873};
113866- exports.push = push ;
113874+ exports.pushChanges = pushChanges ;
113867113875
113868113876
113869113877/***/ }),
@@ -113908,6 +113916,9 @@ const getTest = async (coverageDir) => {
113908113916 failIds.push(element.testID);
113909113917 }
113910113918 });
113919+ if (failIds.length == 0) {
113920+ failIds = obj.filter((e) => e.hasOwnProperty("error")).map((e) => e.testID);
113921+ }
113911113922 let initialString = "";
113912113923 if (failIds.length > 1) {
113913113924 initialString = `${failIds.length} tests failed`;
@@ -113941,6 +113952,10 @@ const getTest = async (coverageDir) => {
113941113952 testDetails = testDetails.replace(/(?:<>'"`)/g, "");
113942113953 errorString.push("<details><summary>" + testName + "</br></summary>`" + testDetails + "`</details>");
113943113954 });
113955+ if (initialString == "") {
113956+ initialString = "Error running tests";
113957+ errorString.push("Unable to get test details. Run flutter test to replicate");
113958+ }
113944113959 const output = `⛔️ - ${initialString}</br >
113945113960 <details><summary>See details</summary>
113946113961 ${errorString.join("")}
@@ -114182,6 +114197,14 @@ module.exports = require("net");
114182114197
114183114198/***/ }),
114184114199
114200+ /***/ 17718:
114201+ /***/ ((module) => {
114202+
114203+ "use strict";
114204+ module.exports = require("node:child_process");
114205+
114206+ /***/ }),
114207+
114185114208/***/ 15673:
114186114209/***/ ((module) => {
114187114210
0 commit comments