test: Smoke Tests for packaged embeds and build improvements#9169
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hariombalhara
commented
May 29, 2023
| "edit-app": "yarn app-store edit", | ||
| "publish-embed": "yarn workspaces foreach --from=\"@calcom/embed*\" npm publish --access=public", | ||
| "withHostedCalcomEnv": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn", | ||
| "publish-embed": "yarn withHostedCalcomEnv workspace @calcom/embed-core build && yarn withHostedCalcomEnv workspace @calcom/embed-snippet build && yarn workspaces foreach --from=\"@calcom/embed*\" npm publish --access=public", |
Member
Author
There was a problem hiding this comment.
embed-core and embed-snippet are the dependencies for embed-react and any new framework specific package(that might be added). So, build them first.
hariombalhara
commented
May 29, 2023
| "__build": "yarn tailwind && vite build && tsc --emitDeclarationOnly --declarationDir dist && cp -r ../../../apps/web/public/embed ./dist/", | ||
| "__dev": "yarn tailwind && vite build --mode development", | ||
| "build": "NEXT_PUBLIC_EMBED_FINGER_PRINT=$(git rev-parse --short HEAD) yarn __build", | ||
| "build": "rm -rf dist && NEXT_PUBLIC_EMBED_FINGER_PRINT=$(git rev-parse --short HEAD) yarn __build", |
Member
Author
There was a problem hiding this comment.
Ensure that build is cleaned before doing a fresh build. it ensures that stale files/changes aren't pushed to npm.
Contributor
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
98a9459 to
3c76cbe
Compare
b91bdcf to
896d147
Compare
896d147 to
a3ee4f6
Compare
a3ee4f6 to
6d6146c
Compare
…sts/smoke-tests-embed
Co-authored-by: Omar López <zomars@me.com>
hariombalhara
commented
May 31, 2023
| run: yarn test-e2e:embed-react | ||
| run: | | ||
| yarn test-e2e:embed-react | ||
| yarn workspace @calcom/embed-react packaged:tests |
Member
Author
There was a problem hiding this comment.
Results for the new test.
https://github.com/calcom/cal.com/actions/runs/5130425921
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds tests for the packaged code and improved package publlishing flow to avoid 2 critical issues reported recently by customers.
Fixes #9168 Fixes CAL-1805
Fixes #9091 Fixes CAL-1757
Type of change
How should this be tested?
yarn test -- --packaged-embed-tests-only. It would need you to buildembed-reactfirst usingcd packages/embeds/embed-react && yarn buildyarn publish-embedcommand after deletingdistfrom all embed packages(embed-core, embed-react,embed-snippet). It would generatedistfolder automatically with correct URL https://app.cal.com