Add custom GHA report for package size (#53241)

This commit is contained in:
Jake Bailey
2023-03-14 09:23:51 -07:00
committed by GitHub
parent 9dfd5ea221
commit edc343d733
4 changed files with 241 additions and 55 deletions

View File

@@ -89,38 +89,15 @@ jobs:
smoke:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./pr
steps:
- uses: actions/checkout@v3
with:
path: pr
- uses: actions/checkout@v3
with:
path: base
ref: ${{ github.base_ref }}
if: github.event_name == 'pull_request'
- uses: actions/setup-node@v3
with:
node-version: "*"
check-latest: true
# Pre-build the base branch so we can check lib folder size changes.
# Note that github.sha points to a merge commit, meaning we're testing
# the base branch versus the base branch with the PR applied.
- name: Build base LKG
if: github.event_name == 'pull_request'
run: |
npm ci
npx hereby lkg
rm -rf $GITHUB_WORKSPACE/pr/lib
mv ./lib $GITHUB_WORKSPACE/pr/
working-directory: ./base
- run: npm ci
- run: npx hereby lkg
@@ -177,6 +154,41 @@ jobs:
node ./smoke.js typescript
node ./smoke.js typescript/lib/tsserverlibrary
package-size:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
path: pr
- uses: actions/checkout@v3
with:
path: base
ref: ${{ github.base_ref }}
- uses: actions/setup-node@v3
with:
node-version: "*"
check-latest: true
- run: npm ci
working-directory: ./pr
- run: npm ci
working-directory: ./base
- run: npx hereby lkg
working-directory: ./pr
- run: npx hereby lkg
working-directory: ./base
- run: |
echo "See $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for more info."
node ./pr/scripts/checkPackageSize.mjs ./base ./pr >> $GITHUB_STEP_SUMMARY
misc:
runs-on: ubuntu-latest