From 6f98bf3b825cc633622c74983f382fb45e8de21f Mon Sep 17 00:00:00 2001 From: Milan Raj Date: Wed, 27 Mar 2024 13:35:37 -0500 Subject: [PATCH] Update chromatic config to be from root (#1965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 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. --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49d7a8ecd9..2182a054dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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