mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Add custom GHA report for package size (#53241)
This commit is contained in:
58
.github/workflows/ci.yml
vendored
58
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user