Adds new InlineCode component #6339
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: Visual test | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| visual-test: | |
| if: ${{ github.repository == 'primer/brand' }} | |
| name: Storybook | |
| runs-on: macos-latest-xlarge | |
| env: | |
| NODE_ENV: test | |
| PLAYWRIGHT_CHROME_PATH: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome # Use local Chrome instead of downaloading | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.14.1 | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run visual tests | |
| id: playwright-step | |
| run: npm run test:visual --workspace=packages/e2e | |
| continue-on-error: true | |
| - name: Upload error screenshots | |
| uses: actions/upload-artifact@v7 | |
| if: steps.playwright-step.outcome != 'success' | |
| with: | |
| name: playwright-test-results | |
| path: packages/e2e/playwright-test-results | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: packages/e2e/playwright-report/ | |
| retention-days: 30 | |
| - name: Comment on the PR about visual differences | |
| if: steps.playwright-step.outcome != 'success' | |
| uses: phulsechinmay/rewritable-pr-comment@a1b041997fa84ec3e524ee9dee5ba0b5f4e73604 # v0.3.0 | |
| with: | |
| message: | | |
| ### ⚠️ Visual differences found | |
| <details><summary>Our visual comparison tests found UI differences.</summary> | |
| Please review the differences by using the test artifacts to ensure that the changes were intentional. | |
| Artifacts can be downloaded and reviewed locally. | |
| Download links are available at the bottom of the workflow summary screen. | |
| ##### Example: | |
|  | |
| If the changes are expected, please run `npm run test:visual:update` to replace the previous fixtures. | |
| </details> | |
| [Review visual differences](https://github.com/primer/brand/actions/runs/${{ github.run_id }}) | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMENT_IDENTIFIER: 'visual-comparison-diff' | |
| - name: Comment on the PR about no visual differences | |
| if: steps.playwright-step.outcome == 'success' | |
| uses: phulsechinmay/rewritable-pr-comment@a1b041997fa84ec3e524ee9dee5ba0b5f4e73604 # v0.3.0 | |
| with: | |
| message: | | |
| ### 🟢 No visual differences found | |
| Our visual comparison tests did not find any differences in the UI. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMENT_IDENTIFIER: 'visual-comparison-diff' |