chore(deps-dev): bump typescript from 4.9.5 to 5.4.5 #235
Workflow file for this run
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
name: File Size | |
on: [pull_request] | |
jobs: | |
build_master: | |
name: Build Master | |
runs-on: ubuntu-latest | |
steps: | |
# Shared Setup | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
- uses: volta-cli/action@v1 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v1 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# TODO: Leverage cache to avoid building `master` more than once | |
- run: yarn install | |
- run: yarn build | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: master-dist | |
path: dist | |
build_pr: | |
name: Build PR | |
runs-on: ubuntu-latest | |
steps: | |
# Shared Setup | |
- uses: actions/checkout@v2 | |
- uses: volta-cli/action@v1 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v1 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install | |
- run: yarn build | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: pr-dist | |
path: dist | |
report: | |
name: Report Sizes | |
runs-on: ubuntu-latest | |
needs: [build_master, build_pr] | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: master-dist | |
path: master-dist | |
- uses: actions/download-artifact@v1 | |
with: | |
name: pr-dist | |
path: pr-dist | |
- name: Get size of Master | |
id: master-size | |
run: | | |
echo "::set-output name=base::$(du -b master-dist/index.js | cut -f1)" | |
echo "::set-output name=modern::$(du -b master-dist/index.modern.js | cut -f1)" | |
echo "::set-output name=module::$(du -b master-dist/index.module.js | cut -f1)" | |
echo "::set-output name=umd::$(du -b master-dist/index.umd.js | cut -f1)" | |
- name: Get size of PR | |
id: pr-size | |
run: | | |
echo "::set-output name=base::$(du -b pr-dist/index.js | cut -f1)" | |
echo "::set-output name=modern::$(du -b pr-dist/index.modern.js | cut -f1)" | |
echo "::set-output name=module::$(du -b pr-dist/index.module.js | cut -f1)" | |
echo "::set-output name=umd::$(du -b pr-dist/index.umd.js | cut -f1)" | |
- name: Post Comment | |
if: steps.master-size.outputs.base != steps.pr-size.outputs.base | |
uses: unsplash/comment-on-pr@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
msg: | | |
| Build | Base | Modern | Module | UMD | | |
| :-- | :-- | :-- | :-- | :-- | | |
| `master` | ${{ steps.master-size.outputs.base }} B | ${{ steps.master-size.outputs.modern }} B | ${{ steps.master-size.outputs.module }} B | ${{ steps.master-size.outputs.umd }} B | | |
| PR Size | ${{ steps.pr-size.outputs.base }} B | ${{ steps.pr-size.outputs.modern }} B | ${{ steps.pr-size.outputs.module }} B | ${{ steps.pr-size.outputs.umd }} B | |