2121 process-icons :
2222 name : Fetch and Build Icons
2323
24- runs-on : ubuntu -latest
24+ runs-on : macos -latest
2525
2626 timeout-minutes : 60
2727
4848 if : steps.modules-cache.outputs.cache-hit != 'true'
4949 run : yarn install --immutable
5050
51+ - name : Use Playwright cache
52+ uses : actions/cache@v4
53+ id : playwright-cache
54+ with :
55+ path : |
56+ ~/Library/Caches/ms-playwright
57+ ~/.cache/ms-playwright
58+ %USERPROFILE%\AppData\Local\ms-playwright
59+ key : ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }}
60+ - run : yarn workspace @dnb/eufemia playwright install --with-deps firefox
61+ if : steps.playwright-cache.outputs.cache-hit != 'true'
62+ - run : yarn workspace @dnb/eufemia playwright install-deps firefox
63+ if : steps.playwright-cache.outputs.cache-hit == 'true'
64+
5165 - name : Icons fetch and prebuild
5266 run : yarn workspace @dnb/eufemia prebuild:figma:ci
5367
@@ -60,55 +74,22 @@ jobs:
6074 - name : Build portal
6175 run : yarn workspace dnb-design-system-portal build:visual-test
6276
63- - name : Store portal artifacts
64- uses : actions/upload-artifact@v4
65- with :
66- name : portal-build-artifact
67- path : ./packages/dnb-design-system-portal/public
68-
69- - name : Commit icons
70- run : yarn workspace @dnb/eufemia postbuild:commit
71-
72- visual-test :
73- needs : process-icons
74- name : Run visual e2e-test for icons
75-
76- runs-on : macos-latest
77-
78- timeout-minutes : 60
79-
80- steps :
81- - name : Git checkout
82- uses : actions/checkout@v4
83- with :
84- persist-credentials : false
85-
86- - name : Use Node.js
87- uses : actions/setup-node@v4
88- with :
89- node-version-file : ' package.json'
90-
91- - name : Use yarn cache
92- uses : actions/cache@v4
93- id : yarn-cache
94- with :
95- path : ./.yarn/cache
96- key : ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }}
97- restore-keys : ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps-
98-
99- - name : Install dependencies
100- run : yarn install --immutable
77+ - name : Run visual tests
78+ run : yarn workspace dnb-design-system-portal test:screenshots:ci:update
10179
102- - name : Re-store portal artifacts
103- uses : actions/download-artifact@v4.1.7
80+ - uses : actions/upload-artifact@v4
81+ if : failure()
10482 with :
105- name : portal-build-artifact
106- path : ./packages/dnb-design-system-portal/public
83+ name : visual-test-artifact
84+ path : |
85+ ./packages/dnb-eufemia/src/**/*.snap-diff.png
86+ ./packages/dnb-eufemia/jest-visual-diff-report/*
10787
108- - name : Run visual tests
109- run : yarn workspace dnb-design-system-portal test:screenshots:ci
88+ - name : Run visual tests info
89+ if : failure()
90+ 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'
11091
111- - name : Commit updated snapshots
92+ - name : Commit icons and updated snapshots
11293 run : yarn workspace @dnb/eufemia postbuild:commit
11394
11495 - name : Slack
0 commit comments