]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/miscs/miscs.ts
Save logs on ci failure
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / miscs / miscs.ts
index 764b74bdaea80454c9fb3206b090ac13329b1230..1cb1cf4408189193c4b1ca59e8e8c667fd8a4fda 100644 (file)
@@ -64,6 +64,10 @@ async function testImage (url: string, imageName: string, imagePath: string, ext
   expect(data.length).to.be.below(maxLength, "the generated image is way larger than the recorded fixture")
 }
 
+function isGithubCI () {
+  return !!process.env.GITHUB_WORKSPACE
+}
+
 function buildAbsoluteFixturePath (path: string, customCIPath = false) {
   if (isAbsolute(path)) return path
 
@@ -151,6 +155,7 @@ export {
   getFileSize,
   immutableAssign,
   testImage,
+  isGithubCI,
   buildAbsoluteFixturePath,
   root,
   generateHighBitrateVideo,