Skip to content

Commit

Permalink
v11.16.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chromatic-support committed Oct 30, 2024
0 parents commit dd2eecb
Show file tree
Hide file tree
Showing 5 changed files with 2,477 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Chroma Software Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GitHub Action for Chromatic

Builds and publishes your Storybook to Chromatic and runs visual regression tests.

📋 [Source code](https://github.com/chromaui/chromatic-cli) ∙ 📚 [Documentation](https://www.chromatic.com/docs/github-actions) ∙ 💬 [Support](https://www.chromatic.com/docs/support)

> ⚠️ This repository is just a deployment target for the GitHub Action. Do not fork or create issues/PRs here.
163 changes: 163 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Publish to Chromatic
author: Chroma Software, Inc.
description: 'Publish your Storybook to Chromatic and run visual regression tests'
branding:
icon: 'aperture'
color: 'orange'

inputs:
allowConsoleErrors:
description: 'Do not exit when runtime errors occur in storybook'
required: false
appCode:
description: 'Deprecated, please use projectToken instead'
required: false
autoAcceptChanges:
description: 'Automatically accept all changes in chromatic: boolean or branchname'
required: false
branchName:
description: 'Override the branch name'
required: false
buildScriptName:
description: 'The npm script that builds your Storybook [build-storybook]'
required: false
buildCommand:
description: 'The command that builds your Storybook (when your build command does not exist in "scripts" of your package.json)'
required: false
configFile:
description: 'Path from where to load the Chromatic config JSON file.'
cypress:
description: 'Run build against `@chromatic-com/cypress` test archives'
required: false
debug:
description: 'Output verbose debugging information'
required: false
diagnostics:
description: 'Deprecated, use diagnosticsFile instead'
required: false
diagnosticsFile:
description: 'Write process context information to a JSON file'
required: false
dryRun:
description: 'Run without actually publishing to Chromatic'
required: false
exitOnceUploaded:
description: 'Exit with 0 once the built version has been sent to chromatic: boolean or branchname'
required: false
exitZeroOnChanges:
description: 'Positive exit of action even when there are changes: boolean or branchname'
required: false
externals:
description: 'Disable TurboSnap when any of these files have changed since the baseline build'
required: false
fileHashing:
description: 'Whether to apply file hashing to skip uploading unchanged files (default: true)'
required: false
forceRebuild:
description: 'Do not skip build when a rebuild is detected'
required: false
ignoreLastBuildOnBranch:
description: 'Do not use the last build on this branch as a baseline if it is no longer in history (i.e. branch was rebased)'
required: false
logFile:
description: 'Write CLI logs to a file'
required: false
logLevel:
description: 'One of: silent, error, warn, info, debug (default: info)'
required: false
logPrefix:
description: 'Custom prefix for log messages (default: current timestamp)'
required: false
only:
description: 'Deprecated, replaced by onlyStoryNames'
required: false
onlyChanged:
description: 'Enables TurboSnap: Only run stories affected by files changed since the baseline build'
required: false
onlyStoryNames:
description: 'Only run a single story or a subset of stories by their name'
required: false
onlyStoryFiles:
description: 'Only run a single story or a subset of stories by their filename(s)'
required: false
playwright:
description: 'Run build against `@chromatic-com/playwright` test archives'
required: false
preserveMissing:
description: 'Deprecated, use onlyChanged, onlyStoryNames or onlyStoryFiles instead'
required: false
projectToken:
description: 'Your chromatic project token (best provided via env.CHROMATIC_PROJECT_TOKEN)'
required: false
repositorySlug:
description: 'Override the repository slug (e.g. ownerName/repositoryName)'
required: false
skip:
description: 'Skip Chromatic tests, but mark the commit as passing'
required: false
skipUpdateCheck:
description: 'Skips Chromatic CLI update check'
required: false
storybookBaseDir:
description: 'Relative path from repository root to Storybook project root'
required: false
storybookBuildDir:
description: 'Provide a directory with your built storybook; use if you have already built your storybook'
required: false
storybookConfigDir:
description: 'Relative path from where you run Chromatic to your Storybook config directory'
required: false
storybookLogFile:
description: 'Write Storybook build logs to a file'
required: false
token:
description: 'Your github token'
required: false
traceChanged:
description: 'Print dependency trace for changed files to affected story files; set to "expanded" to list individual modules'
required: false
untraced:
description: 'Disregard these files and their dependencies when tracing dependent stories for TurboSnap'
required: false
uploadMetadata:
description: 'Upload Chromatic metadata files as part of the published Storybook'
required: false
workingDir:
description: 'Working directory for the package.json file'
required: false
zip:
description: 'Publish your Storybook to Chromatic as a single zip file instead of individual content files'
required: false
junitReport:
description: 'Write build results to a JUnit XML file'
required: false

outputs:
code:
description: 'The exit code for the current run of the Chromatic CLI'
url:
description: 'An alias for the build URL (e.g. https://www.chromatic.com/build?appId=<app id goes here>&number=<build number>)'
buildUrl:
description: 'The build URL (e.g. https://www.chromatic.com/build?appId=<app id goes here>&number=<build number>)'
storybookUrl:
description: 'The Storybook preview URL for your current branch / Pull Request (e.g. https://<app id goes here>-<branch hash>.chromatic.com/)'
specCount:
description: 'The number of stories in the published Storybook'
componentCount:
description: 'The number of components in the published Storybook'
testCount:
description: 'The number of tests on the build'
changeCount:
description: 'The number of tests with visual changes, including any inherited changes (e.g. due to TurboSnap)'
errorCount:
description: 'The number of tests with error(s), including any inherited errors (e.g. due to TurboSnap)'
interactionTestFailuresCount:
description: 'The number of stories with interaction test failures'
actualCaptureCount:
description: 'The number of captured snapshots'
inheritedCaptureCount:
description: 'The number of inherited (not captured) snapshots (e.g. due to TurboSnap)'

runs:
main: action/register.js
using: node20 # Sync with `target` in tsup.config.ts
Loading

0 comments on commit dd2eecb

Please sign in to comment.