mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-05 08:59:09 +08:00
PR feedback
This commit is contained in:
@@ -87,5 +87,19 @@ describe('Cloud Runner Caching', () => {
|
||||
expect(build2NotContainsZeroLibraryCacheFilesMessage).toBeTruthy();
|
||||
expect(build2NotContainsZeroLFSCacheFilesMessage).toBeTruthy();
|
||||
}, 1_000_000_000);
|
||||
afterAll(async () => {
|
||||
// Clean up cache files to prevent disk space issues
|
||||
if (CloudRunnerOptions.providerStrategy === `local-docker` || CloudRunnerOptions.providerStrategy === `aws`) {
|
||||
const cachePath = `./cloud-runner-cache`;
|
||||
if (fs.existsSync(cachePath)) {
|
||||
try {
|
||||
CloudRunnerLogger.log(`Cleaning up cache directory: ${cachePath}`);
|
||||
await CloudRunnerSystem.Run(`rm -rf ${cachePath}/* || true`);
|
||||
} catch (error: any) {
|
||||
CloudRunnerLogger.log(`Failed to cleanup cache: ${error.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -86,6 +86,23 @@ describe('Cloud Runner Retain Workspace', () => {
|
||||
CloudRunnerLogger.log(
|
||||
`Cleaning up ./cloud-runner-cache/${path.basename(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}`,
|
||||
);
|
||||
try {
|
||||
await CloudRunnerSystem.Run(
|
||||
`rm -rf ./cloud-runner-cache/${path.basename(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)} || true`,
|
||||
);
|
||||
} catch (error: any) {
|
||||
CloudRunnerLogger.log(`Failed to cleanup workspace: ${error.message}`);
|
||||
}
|
||||
}
|
||||
// Clean up cache files to prevent disk space issues
|
||||
const cachePath = `./cloud-runner-cache`;
|
||||
if (fs.existsSync(cachePath)) {
|
||||
try {
|
||||
CloudRunnerLogger.log(`Cleaning up cache directory: ${cachePath}`);
|
||||
await CloudRunnerSystem.Run(`rm -rf ${cachePath}/* || true`);
|
||||
} catch (error: any) {
|
||||
CloudRunnerLogger.log(`Failed to cleanup cache: ${error.message}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user