mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
ci: Update Chromatic setup (no-changelog) (#9344)
This commit is contained in:
parent
f50c73a3cb
commit
05dba623eb
35
.github/workflows/chromatic.yml
vendored
35
.github/workflows/chromatic.yml
vendored
|
@ -2,13 +2,21 @@ name: Chromatic
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
branch:
|
||||||
|
- 'master'
|
||||||
paths:
|
paths:
|
||||||
- packages/design-system/**
|
- packages/design-system/**
|
||||||
- .github/workflows/chromatic.yml
|
- .github/workflows/chromatic.yml
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: chromatic-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
chromatic:
|
chromatic:
|
||||||
|
if: ${{ github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'community') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
|
@ -22,7 +30,30 @@ jobs:
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Publish to Chromatic
|
- name: Publish to Chromatic
|
||||||
uses: chromaui/action@latest
|
uses: chromaui/action@v11
|
||||||
|
id: chromatic_tests
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
workingDir: packages/design-system
|
workingDir: packages/design-system
|
||||||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||||
|
exitZeroOnChanges: false
|
||||||
|
|
||||||
|
- name: Success comment
|
||||||
|
if: steps.chromatic_tests.outcome == 'success'
|
||||||
|
uses: peter-evans/create-or-update-comment@v4.0.0
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
edit-mode: replace
|
||||||
|
body: |
|
||||||
|
:white_check_mark: No visual regressions found.
|
||||||
|
|
||||||
|
- name: Fail comment
|
||||||
|
if: steps.chromatic_tests.outcome != 'success'
|
||||||
|
uses: peter-evans/create-or-update-comment@v4.0.0
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
edit-mode: replace
|
||||||
|
body: |
|
||||||
|
[:warning: Visual regressions found](${{steps.chromatic_tests.outputs.url}}): ${{steps.chromatic_tests.outputs.changeCount}}
|
||||||
|
|
Loading…
Reference in a new issue