-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.26 KB
/
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
42
43
44
45
46
47
48
name: compressed-size
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-store
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Use pnpm store
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build GraphQL-Web-Lite
run: pnpm run build
- name: compressed-size-action
uses: preactjs/compressed-size-action@v2
with:
pattern: '{scripts/buildenv/dist-graphql/assets/index.js,scripts/buildenv/dist-lite/assets/index.js}'
build-script: size-check
repo-token: '${{ secrets.GITHUB_TOKEN }}'