Skip to content

Commit 9e69f97

Browse files
committed
fix(ci): isolate Stryker sandboxes from hooks
1 parent 7bb14e4 commit 9e69f97

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎scripts/stryker-diff.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ function runStryker(repoRoot, packageEntry, reportRoot, dryRunOnly) {
378378
.relative(runRoot, path.join(packageRoot, packageEntry.vitestConfig))
379379
.replaceAll("\\", "/"),
380380
STRYKER_REPORT_DIR: reportDirectory,
381+
STRYKER_TEMP_DIR: path.join(repoRoot, ".stryker-tmp", packageEntry.id),
381382
STRYKER_IN_PLACE: "false",
382383
STRYKER_VITEST_RELATED: packageEntry.vitestRelated === false ? "false" : "true",
383384
STRYKER_TEST_FILES: JSON.stringify(packageEntry.testFiles ?? []),

‎src/eslint.config.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ export default [
5858
},
5959
},
6060
{
61-
ignores: ["webview-ui", "out"],
61+
ignores: [".stryker-tmp", "webview-ui", "out"],
6262
},
6363
]

‎src/tsconfig.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"useUnknownInCatchVariables": false
2222
},
2323
"include": ["."],
24-
"exclude": ["node_modules"],
24+
"exclude": ["**/.stryker-tmp", "node_modules"],
2525
"watchOptions": {
2626
"watchFile": "useFsEvents",
2727
"watchDirectory": "useFsEvents",
2828
"fallbackPolling": "dynamicPriority",
2929
"synchronousWatchDirectory": true,
30-
"excludeDirectories": ["**/node_modules", "**/dist", "**/.turbo"]
30+
"excludeDirectories": ["**/node_modules", "**/dist", "**/.stryker-tmp", "**/.turbo"]
3131
}
3232
}

‎stryker.config.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const vitestConfig = process.env.STRYKER_VITEST_CONFIG ?? "vitest.config.ts"
22
const reportDirectory = process.env.STRYKER_REPORT_DIR ?? "reports/mutation"
3+
const tempDirName = process.env.STRYKER_TEMP_DIR ?? ".stryker-tmp"
34
const testFiles = JSON.parse(process.env.STRYKER_TEST_FILES ?? "[]")
45

56
export default {
@@ -12,6 +13,7 @@ export default {
1213
testFiles,
1314
incremental: false,
1415
inPlace: process.env.STRYKER_IN_PLACE === "true",
16+
tempDirName,
1517
concurrency: 2,
1618
timeoutMS: 5_000,
1719
timeoutFactor: 1.5,

0 commit comments

Comments
 (0)