Skip to content

Commit

Permalink
debug..
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic committed Nov 27, 2024
1 parent 8d26ae2 commit 325e1ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,17 @@ function run() {
catch (error) {
return core.setFailed(error.message);
}
// avoid the failing artifact download temporarily, for debugging purposes
if (memory_report) {
core.startGroup("Load reports");
core.info(`Loading reports from "${localReportPath}"`);
const compareContent = fs.readFileSync(localReportPath, "utf8");
core.info(`Format Memory markdown rows`);
const memoryContent = (0, report_1.memoryReports)(compareContent);
const markdown = (0, report_1.formatMemoryReport)(memoryContent);
core.setOutput("markdown", markdown);
return;
}
// cannot use artifactClient because downloads are limited to uploads in the same workflow run
// cf. https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#downloading-or-deleting-artifacts
if (github_1.context.eventName === "pull_request") {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ async function run() {
return core.setFailed((error as Error).message);
}

// avoid the failing artifact download temporarily, for debugging purposes
if (memory_report) {
core.startGroup("Load reports");
core.info(`Loading reports from "${localReportPath}"`);
const compareContent = fs.readFileSync(localReportPath, "utf8");
core.info(`Format Memory markdown rows`);
const memoryContent = memoryReports(compareContent);
const markdown = formatMemoryReport(memoryContent);
core.setOutput("markdown", markdown);
return;
}

// cannot use artifactClient because downloads are limited to uploads in the same workflow run
// cf. https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#downloading-or-deleting-artifacts
if (context.eventName === "pull_request") {
Expand Down

0 comments on commit 325e1ee

Please sign in to comment.