-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (as a temp fix untill #297) :)
…emove install step prior to deploy-storybook
…f components are pulled in to Storybook
The deployment to storybook is working well, now. However:
has all unit tests passing. Whereas running the CI command does not.
This gives a diff in the snapshots:
Since the |
…han any installation that has packages locally linked
overflow: hidden; | ||
position: absolute; | ||
width: 1px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As spoke offline not sure how I feel about us losing this CSS across all our snapshots. Would be good to spend some time debugging it or at minimum opening a new issue to capture the loss of this to the reference LgsrE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noting this, Phil. The issue seems localised to importing the @bbc/psammead-visually-hidden-text
component. It's used in @bbc/psammead-brand
and the tests for @bbc/psammead-caption
.
I've looked through our repository and noted that these are the only two instances of a Psammead component pulling in another Psammead component (rather than utility). Since we're not npm linking all Psammead packages prior to generating snapshots, I believe this is an expected consequence of the change.
This fixes the scenario when npm run ci:packages and npm run test:unit are run sequentially, since some unit tests rely on the output in the dist directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM, Fab work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, definitely feels like lerna has outstayed it's welcome -- thanks for getting to the root of all these issues, Sareh!
👍 |
Resolves #311
Overall change: Fix storybook deployment on Jenkins CI
Code changes:
Ensuring that
npm run ci:packages
runsnpm ci
at the top level and within each of the packages.Updated
package-lock.json
files for several packages since they were out of sync with theirpackage.json
file and gave the following error upon running annpm ci
command in the relevant directorynpm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with
npm installbefore continuing.
Updated Storybook glob pattern to ensure only stories from top level of components are pulled in to Storybook (without this,
*stories.jsx
files withinnode_modules
are attempted to be loaded as well).Removed the
prepare
script since it was running even with an npm ci command. Instead of this, explicitly running thebuild
script when it's needed, prior to publish.Updated snapshots for two components, since they're now generated after a
ci
installation, rather than being locally linked to other packages within Psammead.Ensure
npm run build
is run prior to unit testsNote: locally I ran
npx lerna exec -- head -n 3 package.json package-lock.json
to see which packages had different versions in their package-lock file to their package.json file.