Onboarding v4: design feedback round 2 #5325
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Snapshots | |
| description: | | |
| Runs snapshot tests and uploads test reports as artifacts | |
| If this workflow fails, you can trigger `update-snapshots.yml` from the | |
| GitHub UI. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| permissions: | |
| contents: read | |
| jobs: | |
| snapshots: | |
| timeout-minutes: 10 | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Cache node_modules | |
| id: cache-node-modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| node_modules | |
| injected/node_modules | |
| special-pages/node_modules | |
| messaging/node_modules | |
| types-generator/node_modules | |
| key: ${{ runner.os }}-node-modules-${{ hashFiles('.nvmrc') }}-${{ hashFiles('**/package-lock.json') }} | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} | |
| - name: Install SF Pro Fonts | |
| run: | | |
| curl -L -o SF-Pro.dmg 'https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg' | |
| hdiutil attach SF-Pro.dmg | |
| sudo installer -pkg '/Volumes/SFProFonts/SF Pro Fonts.pkg' -target / | |
| hdiutil detach '/Volumes/SFProFonts' | |
| - name: Install dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - run: npm run build | |
| - name: 'Clean tree' | |
| run: 'npm run test-clean-tree' | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - run: npm run test-int-snapshots | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: snapshots-playwright-report | |
| path: | | |
| special-pages/playwright-report/** | |
| special-pages/test-results/** | |
| injected/playwright-report/** | |
| injected/test-results/** | |
| retention-days: 5 |