Skip to content

Commit 2c9cd77

Browse files
committed
Tests: Run slow scanArtifactsForTokens test in CI only by default
1 parent bc0b696 commit 2c9cd77

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/artifact-scanner.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ test("scanArtifactsForTokens handles files without tokens", async (t) => {
141141
}
142142
});
143143

144-
if (os.platform() !== "win32") {
144+
// This test is slow (extracts and scans a zip artifact), so by default we only run it in CI. Set
145+
// RUN_SLOW_TESTS=1 to run it locally.
146+
if (
147+
os.platform() !== "win32" &&
148+
(process.env.CI === "true" || process.env.RUN_SLOW_TESTS === "1")
149+
) {
145150
test("scanArtifactsForTokens finds token in debug artifacts", async (t) => {
146151
t.timeout(15000); // 15 seconds
147152
const messages: LoggedMessage[] = [];

0 commit comments

Comments
 (0)