-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4023f3e
commit 0b8e1d2
Showing
5 changed files
with
629 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,39 @@ | ||
name: Bundle_Size | ||
# name: Bundle_Size | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - '*' | ||
# - '!master' | ||
|
||
# jobs: | ||
# bundle-size: | ||
# name: Bundle_Size | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Use Node.js 18.x | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: 18.x | ||
|
||
# - name: Checkout current | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Clone master | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: 'master' # branch to compare to | ||
# path: br-base # required | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Bundle size report | ||
# id: bundleSize | ||
# uses: nejcm/[email protected] | ||
# with: | ||
# paths: '/esm/*.js' | ||
# onlyDiff: 'true' | ||
|
||
name: 'Bundle size reporter' | ||
|
||
on: | ||
push: | ||
|
@@ -7,28 +42,40 @@ on: | |
- '!master' | ||
|
||
jobs: | ||
bundle-size: | ||
name: Bundle_Size | ||
composite: | ||
name: 'composite' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Checkout current | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clone master | ||
# Checkout branch to compare to [required] | ||
- name: Checkout base branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: 'master' # branch to compare to | ||
path: br-base # required | ||
ref: 'master' | ||
path: br-base | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Bundle size report | ||
# Generate the bundle size difference report [required] | ||
- name: Generate report | ||
id: bundleSize | ||
uses: nejcm/[email protected] | ||
uses: nejcm/[email protected] | ||
with: | ||
paths: '.size-snapshot.json' | ||
onlyDiff: 'false' | ||
|
||
# Post github action summary | ||
- name: Post summary | ||
if: ${{ steps.bundleSize.outputs.hasDifferences == 'true' }} # post only in case of changes | ||
run: | | ||
echo '${{ steps.bundleSize.outputs.summary }}' >> $GITHUB_STEP_SUMMARY | ||
shell: bash | ||
|
||
# Post github action comment | ||
- name: Post comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: ${{ steps.bundleSize.outputs.hasDifferences == 'true' }} # post only in case of changes | ||
with: | ||
paths: '/esm/*.js' | ||
onlyDiff: 'true' | ||
number: ${{ github.event.pull_request.number }} | ||
header: 'Bundle size report' | ||
append: 'false' | ||
message: '${{ steps.bundleSize.outputs.summary }}' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"index.js": { | ||
"bundled": 68391, | ||
"minified": 18748, | ||
"gzipped": 6091 | ||
}, | ||
"assistant-!~{001}~.js": { | ||
"bundled": 414989, | ||
"minified": 110354, | ||
"gzipped": 27055 | ||
}, | ||
"createAssistantDevOrigin.js": { | ||
"bundled": 119683, | ||
"minified": 101454, | ||
"gzipped": 64063 | ||
}, | ||
"assistant.development.min.js": { | ||
"bundled": 210132, | ||
"minified": 210047, | ||
"gzipped": 90494 | ||
}, | ||
"assistant.production.min.js": { | ||
"bundled": 12127, | ||
"minified": 12107, | ||
"gzipped": 4351 | ||
} | ||
} |
Oops, something went wrong.