-
Notifications
You must be signed in to change notification settings - Fork 11
84 lines (66 loc) · 2.94 KB
/
size-stats.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
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Size stats
on:
pull_request:
branches: [master]
concurrency:
group: size-stats-${{ github.ref }}
cancel-in-progress: true
jobs:
branch-size-stats:
runs-on: ubuntu-latest
outputs:
total-js: ${{ steps.stats.outputs.total-js }}
js-without-icons: ${{ steps.stats.outputs.js-without-icons }}
lib-overhead: ${{ steps.stats.outputs.lib-overhead }}
lib-overhead-gzip: ${{ steps.stats.outputs.lib-overhead-gzip }}
steps:
- uses: actions/checkout@v4
- run: yarn install --immutable --immutable-cache
- run: yarn compile
- id: stats
uses: './.github/actions/size-stats'
master-size-stats:
runs-on: ubuntu-latest
outputs:
total-js: ${{ steps.stats.outputs.total-js }}
js-without-icons: ${{ steps.stats.outputs.js-without-icons }}
lib-overhead: ${{ steps.stats.outputs.lib-overhead }}
lib-overhead-gzip: ${{ steps.stats.outputs.lib-overhead-gzip }}
steps:
- uses: actions/checkout@v4
with:
ref: master
- run: yarn install --immutable --immutable-cache
- run: yarn compile
- id: stats
uses: './.github/actions/size-stats'
show-results:
runs-on: ubuntu-latest
needs: [master-size-stats, branch-size-stats]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Telefonica/github-actions
token: '${{ secrets.NOVUM_PRIVATE_REPOS }}'
path: .github/shared-actions
- run: yarn install --immutable --immutable-cache
- name: Form size stats message
id: message
uses: './.github/actions/size-stats-message'
with:
master-total-js: ${{ needs.master-size-stats.outputs.total-js }}
master-js-without-icons: ${{ needs.master-size-stats.outputs.js-without-icons }}
master-lib-overhead: ${{ needs.master-size-stats.outputs.lib-overhead }}
master-lib-overhead-gzip: ${{ needs.master-size-stats.outputs.lib-overhead-gzip }}
pr-total-js: ${{ needs.branch-size-stats.outputs.total-js }}
pr-js-without-icons: ${{ needs.branch-size-stats.outputs.js-without-icons }}
pr-lib-overhead: ${{ needs.branch-size-stats.outputs.lib-overhead }}
pr-lib-overhead-gzip: ${{ needs.branch-size-stats.outputs.lib-overhead-gzip }}
- name: Comment on PR
uses: ./.github/shared-actions/novum/comment-pr
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
title: '**Size stats**'
message: ${{ steps.message.outputs.message }}
update-if-present: 'true'