Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
1name: compressed-size
2on:
3 pull_request:
4 branches:
5 - main
6
7jobs:
8 build:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v2
12
13 - name: Setup Node
14 uses: actions/setup-node@v1
15 with:
16 node-version: '14'
17
18 - name: Get Yarn cache directory
19 id: yarn-cache-dir-path
20 run: echo "::set-output name=dir::$(yarn cache dir)"
21
22 - name: Use Yarn cache
23 uses: actions/cache@v2
24 id: yarn-cache
25 with:
26 path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27 key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28 restore-keys: |
29 ${{ runner.os }}-yarn-
30
31 - name: Install Dependencies
32 if: |
33 steps.yarn-cache.outputs.cache-hit != 'true' ||
34 steps.node-modules-cache.outputs.cache-hit != 'true'
35 run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent
36
37 - name: Build GraphQL-Web-Lite
38 run: yarn build
39
40 - name: compressed-size-action
41 uses: preactjs/compressed-size-action@v2
42 with:
43 pattern: '{scripts/buildenv/dist-graphql/assets/vendor.*.js,scripts/buildenv/dist-lite/assets/vendor.*.js}'
44 build-script: size-check
45 repo-token: '${{ secrets.GITHUB_TOKEN }}'