mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 08:32:06 +00:00
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
|
name: benchmark
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
pull_request:
|
||
|
paths-ignore:
|
||
|
- "docs/**"
|
||
|
- "*.md"
|
||
|
branches:
|
||
|
- main
|
||
|
- "!v[0-9]*"
|
||
|
|
||
|
# 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
|
||
|
# install playwright binary manually (because pnpm only runs install script once)
|
||
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
||
|
|
||
|
# 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:
|
||
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||
|
- run: corepack enable
|
||
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
||
|
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
|
||
|
uses: CodSpeedHQ/action@ad0378e48c3cb4c700f1cdc5e10943dbad3cc4ec # v2.0.2
|
||
|
with:
|
||
|
run: pnpm vitest bench
|
||
|
token: ${{ secrets.CODSPEED_TOKEN }}
|