Skip to content

build(deps): update dependency eslint-plugin-jsdoc to v46.4.6 #4424

build(deps): update dependency eslint-plugin-jsdoc to v46.4.6

build(deps): update dependency eslint-plugin-jsdoc to v46.4.6 #4424

Workflow file for this run

name: "Chromatic"
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [labeled, synchronize]
jobs:
run:
if: |
(github.event.action == 'labeled' && github.event.label.name == 'pr ready for visual snapshots') ||
(github.event_name == 'push' && github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: skip for markdown only prs
id: markdown-check
run: |
current_branch="$(git rev-parse --abbrev-ref HEAD)"
echo "branch: $current_branch"
if [ "$current_branch" == "main" ]; then
# diff of last commit excluding md (assumes squash merge)
code_changes=$(git diff --name-only @~..@ -- . ':(exclude)*.md*')
echo "workflow running from 'push' event type"
else
# diff of branch excluding md
code_changes=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" origin/main) -- . ':(exclude)*.md*')
echo "workflow running from 'pull_request' event type"
fi
echo "changed files: $code_changes"
# skip if there are only md changes
if [ -z "$code_changes" ]; then
echo "skip chromatic"
echo "SKIP=true" >> $GITHUB_OUTPUT
else
echo "run chromatic"
echo "SKIP=false" >> $GITHUB_OUTPUT
fi
- if: steps.markdown-check.outputs.SKIP == 'false'
uses: actions/setup-node@v3
with:
node-version-file: package.json
- run: npm install
- if: steps.markdown-check.outputs.SKIP == 'false'
name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
zip: true
exitOnceUploaded: true
autoAcceptChanges: main
workingDir: packages/calcite-components
env:
STORYBOOK_SCREENSHOT_TEST_BUILD: true
CHROMATIC_DIFF_THRESHOLD: ${{ secrets.CHROMATIC_DIFF_THRESHOLD }}
- if: steps.markdown-check.outputs.SKIP == 'true'
name: skip chromatic for markdown PRs
uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: UI Tests
description: Chromatic run skipped (markdown PR)
state: success
sha: ${{github.event.pull_request.head.sha || github.sha}}
skip:
if: |
(github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' && github.event.action != 'labeled') ||
(contains(github.event.pull_request.labels.*.name, 'skip visual snapshots'))
runs-on: ubuntu-latest
steps:
- name: skip chromatic for dependabot PRs or no visual changes
uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: UI Tests
description: Chromatic run skipped
state: success
sha: ${{github.event.pull_request.head.sha || github.sha}}