From: Chocobozzz Date: Mon, 24 Aug 2020 14:37:47 +0000 (+0200) Subject: Add fixtures cache to github actions X-Git-Tag: v2.4.0-rc.1~27 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=07491f4b98e0548b41e21bb13a32f3f840b0ab1f;hp=ee90f1bc19c4a62f34f7a329596d613aa931d8a8;p=github%2FChocobozzz%2FPeerTube.git Add fixtures cache to github actions --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6edf3bf8c..f0bd3ba37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index 13b3530b1..e3fd0ec22 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts @@ -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 diff --git a/shared/extra-utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts index 6a73f461e..dfd6e28cb 100644 --- a/shared/extra-utils/miscs/miscs.ts +++ b/shared/extra-utils/miscs/miscs.ts @@ -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)