From 83ef31fe10061f0d3db0df1bc5e7f208972982eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 10 Dec 2020 11:24:17 +0100 Subject: Save logs on ci failure --- shared/extra-utils/miscs/miscs.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shared/extra-utils/miscs') 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, -- cgit v1.2.3