2022-05-26 16:49:29 +00:00
|
|
|
name: Scripts
|
|
|
|
|
|
|
|
on:
|
2023-03-01 14:02:35 +00:00
|
|
|
workflow_dispatch:
|
2022-05-26 16:49:29 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-02-24 15:52:43 +00:00
|
|
|
- "main"
|
2022-07-11 20:11:01 +00:00
|
|
|
paths:
|
2023-02-24 15:52:43 +00:00
|
|
|
- "packages/astro/src/runtime/client/**/*"
|
2022-05-26 16:49:29 +00:00
|
|
|
|
|
|
|
# Automatically cancel in-progress actions on the same branch
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
bundle:
|
|
|
|
name: Bundle Size
|
|
|
|
runs-on: ubuntu-latest
|
2023-02-24 15:52:43 +00:00
|
|
|
steps:
|
2022-05-26 16:49:29 +00:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Checkout Main into tmp
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: main
|
|
|
|
path: main
|
|
|
|
|
2022-10-28 18:36:50 +00:00
|
|
|
- name: Setup PNPM
|
2023-02-24 15:52:43 +00:00
|
|
|
uses: pnpm/action-setup@v2
|
2022-10-28 18:36:50 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-07-24 18:47:07 +00:00
|
|
|
node-version: 18
|
2023-02-24 15:52:43 +00:00
|
|
|
cache: "pnpm"
|
2022-10-28 18:36:50 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
2023-02-24 15:52:43 +00:00
|
|
|
|
2022-05-26 16:49:29 +00:00
|
|
|
- name: Check Bundle Size
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
const { default: script } = await import('${{ github.workspace }}/.github/scripts/bundle-size.mjs')
|
|
|
|
await script({ github, context })
|