]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add fixtures cache to github actions
authorChocobozzz <me@florianbigard.com>
Mon, 24 Aug 2020 14:37:47 +0000 (16:37 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 24 Aug 2020 16:54:37 +0000 (18:54 +0200)
.github/workflows/test.yml
server/tests/api/videos/video-transcoder.ts
shared/extra-utils/miscs/miscs.ts

index 6edf3bf8c5971e9da65139e1588b5a9db77f778f..f0bd3ba3734b9ec6eaea05c27a873066e706cbca 100644 (file)
@@ -66,12 +66,22 @@ jobs:
         with:
           path: |
             **/node_modules
-            ~/fixtures
           key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
           restore-keys: |
             ${{ runner.OS }}-node-
             ${{ runner.OS }}-
 
+      - name: Cache fixtures
+        uses: actions/cache@v2
+        with:
+          path: |
+            fixtures
+          key: ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-${{ hashFiles('fixtures/*') }}
+          restore-keys: |
+            ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-
+            ${{ runner.OS }}-fixtures-
+            ${{ runner.OS }}-
+
       - name: Install dependencies
         run: yarn install --frozen-lockfile
 
index 13b3530b1870a71621141a80250372aa902d0708..e3fd0ec22642fb9fe5839ae14f5a25faaa8604b7 100644 (file)
@@ -242,7 +242,7 @@ describe('Test video transcoding', function () {
   })
 
   it('Should wait for transcoding before publishing the video', async function () {
-    this.timeout(80000)
+    this.timeout(160000)
 
     {
       // Upload the video, but wait transcoding
index 6a73f461e2716bcc9afa5f54c7eb371c50ccb0e8..dfd6e28cbeb6809ecb6cdc8b0d4218838b5b15bc 100644 (file)
@@ -66,8 +66,8 @@ async function testImage (url: string, imageName: string, imagePath: string, ext
 function buildAbsoluteFixturePath (path: string, customCIPath = false) {
   if (isAbsolute(path)) return path
 
-  if (customCIPath) {
-    return join(process.env.HOME, 'fixtures', path)
+  if (customCIPath && process.env.GITHUB_WORKSPACE) {
+    return join(process.env.GITHUB_WORKSPACE, 'fixtures', path)
   }
 
   return join(root(), 'server', 'tests', 'fixtures', path)