diff --git a/.github/workflows/icons-lib.yml b/.github/workflows/icons-lib.yml index c3f10b1dbd8..3a43d4cc6d4 100644 --- a/.github/workflows/icons-lib.yml +++ b/.github/workflows/icons-lib.yml @@ -21,7 +21,7 @@ jobs: process-icons: name: Fetch and Build Icons - runs-on: ubuntu-latest + runs-on: macos-latest timeout-minutes: 60 @@ -57,48 +57,6 @@ jobs: - name: Test prebuild run: yarn workspace @dnb/eufemia test:update - - name: Build portal - run: yarn workspace dnb-design-system-portal build:visual-test - - - name: Store portal artifacts - uses: actions/upload-artifact@v4 - with: - name: portal-build-artifact - path: ./packages/dnb-design-system-portal/public - - - name: Commit icons - run: yarn workspace @dnb/eufemia postbuild:commit - - visual-test: - needs: process-icons - name: Run visual e2e-test for icons - - runs-on: macos-latest - - timeout-minutes: 60 - - steps: - - name: Git checkout - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version-file: 'package.json' - - - name: Use yarn cache - uses: actions/cache@v4 - id: yarn-cache - with: - path: ./.yarn/cache - key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps- - - - name: Install dependencies - run: yarn install --immutable - - name: Use Playwright cache uses: actions/cache@v4 id: playwright-cache @@ -113,21 +71,30 @@ jobs: - 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:update + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: visual-test-artifact + path: | + ./packages/dnb-eufemia/src/**/*.snap-diff.png + ./packages/dnb-eufemia/jest-visual-diff-report/* + + - name: Run visual tests info + if: failure() + run: echo '\n\nšŸ‘‰ Download the diff files as a ZIP file. \nIt is called "visual-test-artifact" and you find it in the test "Summary" under "Artifacts".\n\n\n' + - name: Commit updated snapshots run: yarn workspace @dnb/eufemia postbuild:commit + - name: Commit icons + run: yarn workspace @dnb/eufemia postbuild:commit + - name: Slack uses: 8398a7/action-slack@v3 with: diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml index f20c64b00e8..da66754a761 100644 --- a/.github/workflows/visual-regression.yml +++ b/.github/workflows/visual-regression.yml @@ -47,15 +47,15 @@ jobs: timeout-minutes: 40 steps: - - name: Check branch and exit early - if: startsWith(github.ref, 'refs/heads/icon') - run: echo "Skipping this run on icon* branches" && exit 0 - - name: Git checkout uses: actions/checkout@v4 with: persist-credentials: false + - name: Check branch and exit early + if: startsWith(github.ref, 'refs/heads/icon') + run: echo "Skipping this run on icon* branches" && exit 0 + - name: Use Node.js uses: actions/setup-node@v4 with: