aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/miscs
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-10 11:24:17 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-14 09:11:27 +0100
commit83ef31fe10061f0d3db0df1bc5e7f208972982eb (patch)
tree5d6878c5803e1181ad1a7749c62da56e6f8607e5 /shared/extra-utils/miscs
parent040d6896a3cd5622e78cccdedd8cce2afcf49a31 (diff)
downloadPeerTube-83ef31fe10061f0d3db0df1bc5e7f208972982eb.tar.gz
PeerTube-83ef31fe10061f0d3db0df1bc5e7f208972982eb.tar.zst
PeerTube-83ef31fe10061f0d3db0df1bc5e7f208972982eb.zip
Save logs on ci failure
Diffstat (limited to 'shared/extra-utils/miscs')
-rw-r--r--shared/extra-utils/miscs/miscs.ts5
1 files changed, 5 insertions, 0 deletions
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
64 expect(data.length).to.be.below(maxLength, "the generated image is way larger than the recorded fixture") 64 expect(data.length).to.be.below(maxLength, "the generated image is way larger than the recorded fixture")
65} 65}
66 66
67function isGithubCI () {
68 return !!process.env.GITHUB_WORKSPACE
69}
70
67function buildAbsoluteFixturePath (path: string, customCIPath = false) { 71function buildAbsoluteFixturePath (path: string, customCIPath = false) {
68 if (isAbsolute(path)) return path 72 if (isAbsolute(path)) return path
69 73
@@ -151,6 +155,7 @@ export {
151 getFileSize, 155 getFileSize,
152 immutableAssign, 156 immutableAssign,
153 testImage, 157 testImage,
158 isGithubCI,
154 buildAbsoluteFixturePath, 159 buildAbsoluteFixturePath,
155 root, 160 root,
156 generateHighBitrateVideo, 161 generateHighBitrateVideo,