From 9a2617a6d45de7b993b1c04b94d3f3f2c21aa9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Thu, 30 Jan 2025 11:05:28 +0100 Subject: [PATCH] Build Portal before running "Run visual tests" --- .github/workflows/icons-lib.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/icons-lib.yml b/.github/workflows/icons-lib.yml index d5d4737de4a..a4f50ad3e66 100644 --- a/.github/workflows/icons-lib.yml +++ b/.github/workflows/icons-lib.yml @@ -99,12 +99,29 @@ jobs: - name: Install dependencies run: yarn install --immutable + - name: Use Playwright cache + uses: actions/cache@v4 + id: playwright-cache + with: + path: | + ~/Library/Caches/ms-playwright + ~/.cache/ms-playwright + %USERPROFILE%\AppData\Local\ms-playwright + key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} + - run: yarn workspace @dnb/eufemia playwright install --with-deps firefox + if: steps.playwright-cache.outputs.cache-hit != 'true' + - run: yarn workspace @dnb/eufemia playwright install-deps firefox + if: steps.playwright-cache.outputs.cache-hit == 'true' + - name: Re-store portal artifacts uses: actions/download-artifact@v4.1.7 with: name: portal-build-artifact path: ./packages/dnb-design-system-portal/public + - name: Build portal + run: yarn workspace dnb-design-system-portal build:visual-test + - name: Run visual tests run: yarn workspace dnb-design-system-portal test:screenshots:ci