-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (34 loc) · 1.06 KB
/
compressed-size.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
name: Compressed Size
on: [pull_request]
permissions:
pull-requests: write
jobs:
compressed_size:
if: ${{ github.actor != 'gu-scala-steward-public-repos[bot]' }}
name: Compressed Size
defaults:
run:
working-directory: support-frontend
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
# Cache npm dependencies using https://github.com/bahmutov/npm-install
- name: Cache dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: support-frontend
- name: Install
run: yarn
- name: Check compressed size of JS
uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
cwd: "./support-frontend"
pattern: "./public/compiled-assets/{javascripts,webpack}/**/*.js"
build-script: "build-github-action"
minimum-change-threshold: 500