Skip to content

Commit

Permalink
test artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan committed Mar 19, 2024
1 parent a14cf0d commit 2c8a1fb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions detox/save_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ const saveReport = async () => {
await mergeJestStareJsonFiles(jestStareCombinedFilePath, [`${ARTIFACTS_DIR}/ios-results*/jest-stare/${platform}-data*.json`]);
generateJestStareHtmlReport(jestStareOutputDir, `${platform}-report.html`, jestStareCombinedFilePath);

if (process.env.CI) {
// Delete folders starting with "iOS-results-" only in CI environment
const entries = fs.readdirSync(ARTIFACTS_DIR, {withFileTypes: true});
for (const entry of entries) {
if (entry.isDirectory() && entry.name.startsWith('ios-results-')) {
fs.rmSync(path.join(ARTIFACTS_DIR, entry.name), {recursive: true});
}
}
}
// if (process.env.CI) {
// // Delete folders starting with "iOS-results-" only in CI environment
// const entries = fs.readdirSync(ARTIFACTS_DIR, {withFileTypes: true});
// for (const entry of entries) {
// if (entry.isDirectory() && entry.name.startsWith('ios-results-')) {
// fs.rmSync(path.join(ARTIFACTS_DIR, entry.name), {recursive: true});
// }
// }
// }
const result = await saveArtifacts();
if (result && result.success) {
console.log('Successfully uploaded artifacts to S3:', result.reportLink);
Expand Down

0 comments on commit 2c8a1fb

Please sign in to comment.