X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fmiscs%2Fmiscs.ts;h=1cb1cf4408189193c4b1ca59e8e8c667fd8a4fda;hb=ba5d4a849c7d7ba05f093480ae12286c4af61556;hp=764b74bdaea80454c9fb3206b090ac13329b1230;hpb=2d53be0267acc49cda46707b885096193a1f4e9c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts index 764b74bda..1cb1cf440 100644 --- a/shared/extra-utils/miscs/miscs.ts +++ b/shared/extra-utils/miscs/miscs.ts @@ -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,