-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (64 loc) · 2.04 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: "Generate bundle-size for react charting"
on:
schedule:
- cron: "30 3 * * *"
# "30 3 * * *" --> Every day at 3:30 AM UTC --> Every day at 9:00 AM IST
workflow_dispatch:
inputs:
repo:
description: "Repo to run monosize on"
required: true
default: "microsoft/fluentui"
branch:
description: "Branch to run monosize on"
required: true
default: "master"
permissions:
contents: write
jobs:
run-monosize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.inputs.repo || 'microsoft/fluentui'}}
ref: ${{github.event.inputs.branch || 'master'}}
path: repo
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: ./repo/yarn.lock
- name: "Install dependencies and build upto react-charting"
run: |
cd repo
yarn && yarn buildto @fluentui/react-charting
- name: "Run monosize on react-charting"
run: |
cd repo/packages/react-charting
yarn monosize measure
mv -f ./dist/bundle-size/monosize.json ./../../../
cd ./../../../
rm -rf ./repo
- uses: actions/checkout@v4
with:
repository: 'microsoft/fluentui-charting-contrib'
ref: 'test-coverage-artifacts'
path: contrib-repo
- name: Move new bundle-size to folder and clear old folder
run: |
cd ./contrib-repo
if [ -d bundle-size ]; then
rm -rf ./bundle-size
fi
mkdir bundle-size
cd ..
mv -f ./monosize.json ./contrib-repo/bundle-size/
cd contrib-repo/bundle-size
ls -a
- name: Push bundle-size to branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: contrib-repo
branch: test-coverage-artifacts
commit_message: Scheduled bundle-size changes push