playwright-slack-report-burak 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,12 +92,21 @@ class ResultsParser {
|
|
|
92
92
|
// Write the updated summary back to the file for the current node
|
|
93
93
|
fs.writeFileSync(nodeSummaryFile, JSON.stringify(nodeSummary, null, 2));
|
|
94
94
|
|
|
95
|
-
console.log('current shard index', this.shardIndex, 'type:', typeof this.shardIndex, 'total shard count', this.totalShardCount, 'type:', typeof this.totalShardCount);
|
|
95
|
+
console.log('current shard index', this.shardIndex, 'type:', typeof this.shardIndex, 'total shard count', this.totalShardCount, 'type:', typeof this.totalShardCount, 'CI', process.env.CI, 'type:', typeof process.env.CI);
|
|
96
96
|
if (this.shardIndex === 0 && this.totalShardCount > 1) {
|
|
97
|
+
if (process.env.CI) {
|
|
97
98
|
console.log('Fetching all artifacts...');
|
|
98
99
|
await this.fetchAllArtifacts();
|
|
100
|
+
} else {
|
|
101
|
+
while (!this.allNodeSummaryFilesExist() || !this.allBlobZipsExist()) {
|
|
102
|
+
console.log('Waiting for all blob zips to exist...');
|
|
103
|
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for 1 second
|
|
104
|
+
}
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
|
|
108
|
+
console.log('Contents of playwright-report for node', this.shardIndex, ':', fs.readdirSync(summariesDir));
|
|
109
|
+
|
|
101
110
|
if (this.allNodeSummaryFilesExist() && this.allBlobZipsExist()) {
|
|
102
111
|
// Merge all node summaries into the final summary
|
|
103
112
|
for (let i = 0; i < this.totalShardCount; i++) {
|
|
@@ -118,7 +127,7 @@ class ResultsParser {
|
|
|
118
127
|
this.mergeReports();
|
|
119
128
|
return summary;
|
|
120
129
|
} else {
|
|
121
|
-
return { stopReporter: true };
|
|
130
|
+
return { stopReporter: true, currentShardIndex: this.shardIndex, totalShardCount: this.totalShardCount };
|
|
122
131
|
}
|
|
123
132
|
}
|
|
124
133
|
async getFailures() {
|
|
@@ -70,9 +70,9 @@ class SlackReporter {
|
|
|
70
70
|
this.log(message);
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const stopReporter = await this.resultsParser.getParsedResults();
|
|
73
|
+
const { stopReporter, currentShardIndex, totalShardCount } = await this.resultsParser.getParsedResults();
|
|
74
74
|
if (stopReporter) {
|
|
75
|
-
this.log(
|
|
75
|
+
this.log(`❌ Stopping reporter for non-zero index node ${currentShardIndex} of ${totalShardCount}`);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
const resultSummary = await this.resultsParser.getParsedResults();
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint-fix": "npx eslint . --ext .ts --fix"
|
|
31
31
|
},
|
|
32
32
|
"name": "playwright-slack-report-burak",
|
|
33
|
-
"version": "2.0.
|
|
33
|
+
"version": "2.0.8",
|
|
34
34
|
"main": "index.js",
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",
|