chromatic-cli
chromatic-cli copied to clipboard
Chromatic Action bug: `skip` doesn't always mark "UI Review" as skipped
Bug report
We are using skip
in Chromatic's GH action. It works sometimes, but other times, it fails to mark "UI Review" as "skipped". Interestingly, "UI Test" does always seem to be marked as "Skipped".
Chromatic build output
CI Checks (2 different screenshots, but from the same build)
Please let me know if there are any known fixes, or if you need more info from me :)
Hi @amhunt,
It is a little trickier for Chromatic to skip that check because it needs to match your CI build to a PR. Sometimes it has trouble if the branch or slug name reported from the CI is not correct. I've replied to you in intercom with the values we had for this skipped build-- but for others seeing this problem that is probably the place to start.
Chromatic support point me to this issue. For anyone wondering, this is how to pass the env vars to it:
name: Chromatic
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
branches:
- main
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch the full Git history
- name: Install dependencies
run: npm install
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
skip: ${{ !contains(github.event.pull_request.labels.*.name, 'requires-ux-review') }}
env:
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha }}
CHROMATIC_BRANCH: ${{ github.head_ref }}
CHROMATIC_SLUG: 'gitub/github'