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-10-23 19:15:47 +00:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2023-12-21 14:59:23 +00:00
|
|
|
- run: corepack enable
|
2024-10-24 15:23:59 +00:00
|
|
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
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-11-05 21:41:51 +00:00
|
|
|
uses: CodSpeedHQ/action@fa1dcde8d58f2ab0b407a6a24d6cc5a8c1444a8c # v3.1.0
|
2023-12-21 14:59:23 +00:00
|
|
|
with:
|
|
|
|
run: pnpm vitest bench
|
|
|
|
token: ${{ secrets.CODSPEED_TOKEN }}
|