Skip to content

Commit

Permalink
Update chromatic config to be from root (#1965)
Browse files Browse the repository at this point in the history
# Pull Request

## 🤨 Rationale

Chromatic was failing to detect the storybookdir configuration
correctly. Guess was that the interactions between workingdir and the
other options were weird. Removed the working dir option and kept all
paths relative to the repo root.

## 👩‍💻 Implementation

See above.

## 🧪 Testing

Validated in a build that turbosnap detected just changes associated
with updated files:

https://github.com/ni/nimble/actions/runs/8456254529/job/23165615846?pr=1965#step:13:52

Validated that disabling turbosnap for the branch (as if running on
main) seemed to upload correctly:

https://github.com/ni/nimble/actions/runs/8456510572/job/23166454906#step:13:61

## ✅ Checklist

- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.
  • Loading branch information
rajsite authored Mar 27, 2024
1 parent a01932b commit 6f98bf3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,11 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: "!startsWith(github.ref, 'refs/heads/main')" # Use TurboSnap for PR builds
workingDir: ./packages/nimble-components
externals: |
- '.storybook/public/**'
- '../packages/nimble-tokens/dist/icons/svg/**'
- '../packages/nimble-tokens/source/styledictionary/properties/**'
storybookBuildDir: ../../packages/site/dist/storybook
- './packages/nimble-components/.storybook/public/**'
- './packages/nimble-tokens/dist/icons/svg/**'
- './packages/nimble-tokens/source/styledictionary/properties/**'
storybookBuildDir: ./packages/site/dist/storybook
storybookBaseDir: ./packages/nimble-components
exitOnceUploaded: true # Do not wait for test results
exitZeroOnChanges: true # Option to prevent the workflow from failing
Expand Down

0 comments on commit 6f98bf3

Please sign in to comment.