-
Notifications
You must be signed in to change notification settings - Fork 71
38 lines (38 loc) · 1.25 KB
/
bundlesize.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: bundlesize
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
bundlesize:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
path: new
- uses: actions/checkout@v4
with:
path: old
ref: ${{ github.base_ref }}
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@graphcommerce'
cache-dependency-path: ./old/yarn.lock
- run: cd new && yarn install && cd ..
- run: cd new/examples/magento-graphcms && yarn build > ../../../new.txt && cd ../../..
- run: cat new.txt
- run: cd old && yarn install && cd ..
- run: cd old/examples/magento-graphcms && yarn build > ../../../old.txt && cd ../../..
- run: cat old.txt
- uses: ho-nl/next-bundlesize-action@master
id: 'bundlesize'
- uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.bundlesize.outputs.diff != ''
with:
msg: ${{steps.bundlesize.outputs.diff}}
check_for_duplicate_msg: false