Skip to content

Commit 1b14b9a

Browse files
authored
Exclude filtered sample folders from changed samples (#1186)
Filter out excluded sample folders from the list of changed samples before running tests.
1 parent 8f05d77 commit 1b14b9a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

e2e/samples.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const getAllSampleFolders = () => {
3636
// Ensure we are only looking at directories within samplesDir, excluding find-changes.sh itself if it's a file
3737
const filePath = path.join(samplesDir, file);
3838
return fs.statSync(filePath).isDirectory();
39-
}).filter(sampleFolder => !isExcluded(sampleFolder));
39+
});
4040
};
4141

4242
// Function to return only changed sample folders.
@@ -96,7 +96,7 @@ const getChangedSampleFolders = (): string[] => {
9696
}
9797

9898
console.log("Running tests only for changed samples: ", validChangedFolders);
99-
return validChangedFolders;
99+
return validChangedFolders.filter(sampleFolder => !isExcluded(sampleFolder)); // Filter excluded samples.
100100

101101
} catch (error) {
102102
console.error("Error running find-changes.sh. Skipping tests:", error);

0 commit comments

Comments
 (0)