2023-12-21 14:59:23 +00:00
|
|
|
name: benchmark
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-12-25 13:20:48 +00:00
|
|
|
# pull_request:
|
|
|
|
# paths-ignore:
|
|
|
|
# - "docs/**"
|
|
|
|
# - "*.md"
|
|
|
|
# branches:
|
|
|
|
# - main
|
|
|
|
# - "!v[0-9]*"
|
2023-12-21 14:59:23 +00:00
|
|
|
|
|
|
|
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml
|
|
|
|
env:
|
|
|
|
# 7 GiB by default on GitHub, setting to 6 GiB
|
|
|
|
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
|
|
NODE_OPTIONS: --max-old-space-size=6144
|
|
|
|
|
|
|
|
# Remove default permissions of GITHUB_TOKEN for security
|
|
|
|
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
|
|
|
permissions: {}
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
|
|
|
cancel-in-progress: ${{ github.event_name != 'push' }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-06-13 12:37:54 +00:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-12-21 14:59:23 +00:00
|
|
|
- run: corepack enable
|
2024-09-19 15:35:29 +00:00
|
|
|
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2023-12-21 14:59:23 +00:00
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
cache: "pnpm"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
|
|
|
|
|
|
|
- name: Build (stub)
|
|
|
|
run: pnpm dev:prepare
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: pnpm build
|
|
|
|
|
|
|
|
- name: Run benchmarks
|
2024-07-31 16:32:07 +00:00
|
|
|
uses: CodSpeedHQ/action@ab07afd34cbbb7a1306e8d14b7cc44e029eee37a # v3.0.0
|
2023-12-21 14:59:23 +00:00
|
|
|
with:
|
|
|
|
run: pnpm vitest bench
|
|
|
|
token: ${{ secrets.CODSPEED_TOKEN }}
|