Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bundle analyze workflow #221

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

kylemocode
Copy link
Contributor

@kylemocode kylemocode commented Jun 30, 2023

Why need this change? / Root cause:

  • I found that bundlewatch wasn't powerful enough, so I sought out a third-party custom action to monitor bundle size changes (a diff comparison between the new current branch and the base branch) within PRs.
  • Bundlewatch is still retained because the size limit setting is relatively high. It serves as a final gatekeeper, only raising an alert when the bundle size becomes absurdly large.
  • The actual effect can be referenced in this demo PR and the image below.
截圖 2023-07-02 上午11 29 56
  • Currently the workflow will fail because the main base branch have no bundle stat yet, it will create main branch bundle stat after merging

Changes made:

Test Scope / Change impact:

Issue

@kylemocode kylemocode changed the title [WIP]feat: bundle analyze workflow feat: bundle analyze workflow Jul 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@GaaSBot
Copy link

GaaSBot commented Jul 6, 2023

Knip Scan Result for 2c6be18

Unused files (8)
Unused files (8)
.bundlewatch.config.js
components/shared/Modal/index.tsx
components/shared/Modalow/Example.tsx
components/shared/Toast/CtxToastQueue.tsx
lighthouserc.js
reset.d.ts
scripts/knipScanReporter.js
scripts/lhciScanReporter.js
Unused dependencies (3)
Unused dependencies (3)
@svgr/webpack package.json
sharp package.json
swr package.json
Unused devDependencies (5)
Unused devDependencies (5)
@actions/github package.json
@octokit/core package.json
@storybook/blocks package.json
@storybook/testing-library package.json
@total-typescript/ts-reset package.json
Unused exports (3)
Unused exports (3)
RoomsListTitle components/rooms/RoomsList.tsx
setFlags components/shared/Modal/ModalManager/src/ModalManagerBase.tsx
createNicknameEndpoint requests/users/index.ts
Unused exports in namespaces (7)
Unused exports in namespaces (7)
dotSizeVariants components/shared/Badge/Badge.tsx
textSizeVariants components/shared/Badge/Badge.tsx
INITIAL_TOAST_POSITION components/shared/Toast/ToastQueueContext.tsx
MAX_TOAST_MOUNT_SIZE components/shared/Toast/ToastQueueContext.tsx
MAX_TOAST_QUEUE_SIZE components/shared/Toast/ToastQueueContext.tsx
TOAST_QUEUE_STATE components/shared/Toast/ToastQueueContext.tsx
ToastQueueContext components/shared/Toast/ToastQueueContext.tsx
Unused exported types (22)
Unused exported types (22)
GameListProp interface components/lobby/CreateRoomModal/GameListModal/GameList/index.tsx
GroupedGamesType type components/lobby/CreateRoomModal/GameListModal/GameList/index.tsx
RoomBreadcrumbType type components/rooms/RoomBreadcrumb.tsx
RoomButtonGroupProps type components/rooms/RoomButtonGroup.tsx
RoomChatroom type components/rooms/RoomChatroom/RoomChatroom.tsx
RoomUserCardListProps type components/rooms/RoomUserCardList/RoomUserCardList.tsx
DisabledUserCardProp interface components/rooms/RoomUserCardList/UserCard/UserCard.tsx
WatingUserCardProp interface components/rooms/RoomUserCardList/UserCard/UserCard.tsx
CarouselArrowButtonProps interface components/shared/Carousel/CarouselArrowButton.tsx
CarouselItemProps interface components/shared/Carousel/CarouselItem.tsx
CoverProps interface components/shared/Cover/index.tsx
IconProps type components/shared/Icon/Icon.tsx
BodyProps interface components/shared/Modalow/Body.tsx
FooterProps interface components/shared/Modalow/Footer.tsx
HeaderProps interface components/shared/Modalow/Header.tsx
MaskProps interface components/shared/Modalow/Mask.tsx
SOCKET_EVENT enum containers/provider/ChatroomProvider.tsx
WS_ReadyState enum containers/provider/ChatroomProvider.tsx
CookieKey enum hooks/useCookie.ts
Game type requests/rooms/index.ts
PageMeta type requests/rooms/index.ts
RoomEntry type requests/rooms/index.ts
Unused exported types in namespaces (33)
Unused exported types in namespaces (33)
AvatarButtonProps interface components/shared/Avatar/Avatar.tsx
AvatarImageProps interface components/shared/Avatar/Avatar.tsx
AvatarLinkProps interface components/shared/Avatar/Avatar.tsx
AvatarProps type components/shared/Avatar/Avatar.tsx
AvatarShape type components/shared/Avatar/Avatar.tsx
AvatarSizeType type components/shared/Avatar/Avatar.tsx
AvatarType type components/shared/Avatar/Avatar.tsx
BaseAvatarProps interface components/shared/Avatar/Avatar.tsx
BadgePositionVariant enum components/shared/Badge/Badge.tsx
BadgeProps interface components/shared/Badge/Badge.tsx
BadgeSizeVariant enum components/shared/Badge/Badge.tsx
BaseButtonProps interface components/shared/Button/Button.tsx
ButtonProps type components/shared/Button/Button.tsx
CarouselProps interface components/shared/Carousel/Carousel.tsx
InputProps interface components/shared/Input/Input.tsx
ModalSizeVariant enum components/shared/Modalow/Modalow.tsx
PortalProps interface components/shared/Portal/Portal.tsx
SearchBarProps interface components/shared/SearchBar/SearchBar.tsx
SubmitHandler type components/shared/SearchBar/SearchBar.tsx
TabProps interface components/shared/Tabs/Tab.tsx
TabSizeType type components/shared/Tabs/Tabs.tsx
TagProps interface components/shared/Tag/Tag.tsx
ToastPropLength type components/shared/Toast/Toast.tsx
ToastPropRounded type components/shared/Toast/Toast.tsx
ToastPropSize type components/shared/Toast/Toast.tsx
ToastPropState type components/shared/Toast/Toast.tsx
CtxToastQueueProviderProps interface components/shared/Toast/ToastQueueContext.tsx
CtxToastQueueValue interface components/shared/Toast/ToastQueueContext.tsx
ToastQueueMap type components/shared/Toast/ToastQueueContext.tsx
ToastQueueMapValue type components/shared/Toast/ToastQueueContext.tsx
ToastQueueState type components/shared/Toast/ToastQueueContext.tsx
ToastQueueValue type components/shared/Toast/ToastQueueContext.tsx
UseToast interface components/shared/Toast/useToast.tsx
Duplicate exports (10)
Duplicate exports (10)
RoomChatroom, default components/rooms/RoomChatroom/RoomChatroom.tsx
Badge, default components/shared/Badge/Badge.tsx
Button, default components/shared/Button/Button.tsx
Input, default components/shared/Input/Input.tsx
Body, default components/shared/Modalow/Body.tsx
Footer, default components/shared/Modalow/Footer.tsx
Header, default components/shared/Modalow/Header.tsx
Mask, default components/shared/Modalow/Mask.tsx
Modalow, default components/shared/Modalow/Modalow.tsx
SearchBar, default components/shared/SearchBar/SearchBar.tsx
Configuration issues (1)
Configuration issues (1)
Unused item in ignoreDependencies: @next/bundle-analyzer

@GaaSBot
Copy link

GaaSBot commented Jul 6, 2023

🤖 Lighthouse Scan Result for 2c6be18

/rooms
Metric Value
Performance 69
Seo 80
Accessibility 78
HTML Report for LHCI Scan Report Link
/rooms/abc
Metric Value
Performance 76
Seo 80
Accessibility 67
HTML Report for LHCI Scan Report Link
/login
Metric Value
Performance 52
Seo 80
Accessibility 94
HTML Report for LHCI Scan Report Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants