Skip to content

Commit efc800e

Browse files
committed
add fix for artifact
1 parent f19c9ec commit efc800e

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

browserstack-report-action/dist/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41780,13 +41780,11 @@ class ReportProcessor {
4178041780
} else {
4178141781
await summary.addRaw('⚠️ No report content available');
4178241782
}
41783-
41783+
summary.write();
4178441784
if(reportData?.report?.rich_html) {
4178541785
const report = `<!DOCTYPE html> <html><head><style>${reportData?.report?.rich_css}</style></head> ${reportData?.report?.rich_html}</html>`;
4178641786
await ArtifactManager.saveReportAsArtifact(report, buildName);
4178741787
}
41788-
41789-
return summary.write();
4179041788
} catch (error) {
4179141789
await core.info(`Error processing report: ${JSON.stringify(error)}`);
4179241790
await core.summary
@@ -41930,7 +41928,7 @@ class ArtifactManager {
4193041928
fs.mkdirSync(artifactDir, { recursive: true });
4193141929

4193241930
// Create HTML file
41933-
const fileName = `index.html`;
41931+
const fileName = `report.html`;
4193441932
const filePath = path.join(artifactDir, fileName);
4193541933

4193641934
// Write content
@@ -41952,7 +41950,7 @@ class ArtifactManager {
4195241950
core.warning('Artifact API not available. Report saved locally only.');
4195341951
return `File saved locally at: ${filePath}`;
4195441952
}
41955-
const artifactName = `browserstack-test-report`;
41953+
const artifactName = `browserstack`;
4195641954

4195741955
const uploadResult = await artifactClient.uploadArtifact(
4195841956
artifactName,

browserstack-report-action/src/services/ReportProcessor.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ class ReportProcessor {
1515
} else {
1616
await summary.addRaw('⚠️ No report content available');
1717
}
18-
18+
summary.write();
1919
if(reportData?.report?.rich_html) {
2020
const report = `<!DOCTYPE html> <html><head><style>${reportData?.report?.rich_css}</style></head> ${reportData?.report?.rich_html}</html>`;
2121
await ArtifactManager.saveReportAsArtifact(report, buildName);
2222
}
23-
24-
return summary.write();
2523
} catch (error) {
2624
await core.info(`Error processing report: ${JSON.stringify(error)}`);
2725
await core.summary

browserstack-report-action/src/utils/ArtifactManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ArtifactManager {
1818
fs.mkdirSync(artifactDir, { recursive: true });
1919

2020
// Create HTML file
21-
const fileName = `index.html`;
21+
const fileName = `report.html`;
2222
const filePath = path.join(artifactDir, fileName);
2323

2424
// Write content
@@ -40,7 +40,7 @@ class ArtifactManager {
4040
core.warning('Artifact API not available. Report saved locally only.');
4141
return `File saved locally at: ${filePath}`;
4242
}
43-
const artifactName = `browserstack-test-report`;
43+
const artifactName = `browserstack`;
4444

4545
const uploadResult = await artifactClient.uploadArtifact(
4646
artifactName,

0 commit comments

Comments
 (0)