forked from netlify/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1006 Bytes
/
benchmark.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
name: Calculate package size
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
package-size:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '*'
cache: 'npm'
cache-dependency-path: 'npm-shrinkwrap.json'
check-latest: true
- name: Install dependencies
run: npm ci --no-audit && npm prune --production
- name: Get size
run: du -sk node_modules | cut -f1 > .delta.packageSize && echo "kb (Package size)" >> .delta.packageSize
- name: Save PR number
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > ./pr_number
- name: Upload deltas
uses: actions/upload-artifact@v3
with:
name: delta-action-deltas
retention-days: 7
path: |
.delta.*
pr_number