Skip to content

Commit c8d702d

Browse files
fix: writeReportToFile before and after enrichment for early and fina… (#177)
1 parent bbe5489 commit c8d702d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ctrf/report-preparation.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export async function prepareReport(
4646
report = enrichCurrentReportWithRunDetails(report, githubContext)
4747
if (inputs.uploadArtifact) await uploadArtifact(inputs.artifactName, report)
4848

49+
if (inputs.writeCtrfToFile) {
50+
writeReportToFile(inputs.writeCtrfToFile, report)
51+
}
52+
4953
if (shouldGroupTests(inputs)) {
5054
report = groupTestsBySuiteOrFilePath(
5155
report,
@@ -67,13 +71,17 @@ export async function prepareReport(
6771
)
6872
}
6973

74+
core.startGroup(`📜 Further enriching CTRF report`)
7075
report = addFooterDisplayFlags(report, inputs)
7176

7277
if (shouldPrefixTestNames(inputs)) {
7378
report = prefixTestNames(report)
7479
}
7580

76-
if (inputs.writeCtrfToFile) writeReportToFile(inputs.writeCtrfToFile, report)
81+
if (inputs.writeCtrfToFile) {
82+
writeReportToFile(inputs.writeCtrfToFile, report)
83+
}
84+
core.endGroup()
7785

7886
return report
7987
}

0 commit comments

Comments
 (0)