Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Benchmark

on:
schedule:
- cron: '0 1 * * *' # 01:00 UTC
workflow_dispatch:
inputs:
ref:
description: 'head to bench (input branch, tag or SHA)'
required: true
default: 'main'

jobs:
benchmark:
# Only Ubuntu 20.04 and 22.04 are supported at the moment.
# See https://github.com/CodSpeedHQ/action/blob/016456b513677f9d4a1c509c7f8a38d8dd55b2b0/.github/workflows/ci.yml#L19.
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ inputs.ref || 'main' }}

- name: Install pnpm
run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install && cd ./tests && pnpm playwright install chromium

# only run benchmark in Ubuntu
- name: Benchmarks (Vitest)
uses: CodSpeedHQ/action@v3
with:
run: pnpm run test:benchmark
# token retrieved from the CodSpeed app at the previous step
token: ${{ secrets.CODSPEED_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 1

- name: Install Pnpm
- name: Install pnpm
run: corepack enable

- name: Setup Node.js
Expand All @@ -37,5 +37,5 @@ jobs:
- name: Check Dependency Version
run: pnpm run check-dependency-version

- name: Check Pnpm Dedupe
- name: Check pnpm Dedupe
run: pnpm dedupe --check
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 1
ref: ${{ github.event.inputs.branch }}

- name: Install Pnpm
- name: Install pnpm
run: corepack enable

- name: Setup Node.js
Expand Down
44 changes: 4 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
fetch-depth: 10

- name: Install Pnpm
- name: Install pnpm
run: corepack enable

- uses: dorny/[email protected]
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
run: |
git config --system core.longpaths true

- name: Install Pnpm
- name: Install pnpm
run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
with:
fetch-depth: 10

- name: Install Pnpm
- name: Install pnpm
run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
Expand All @@ -122,46 +122,10 @@ jobs:
- name: E2E Test (Playwright)
run: pnpm run test:e2e

# ======== benchmark ========
benchmark:
# Only Ubuntu 20.04 and 22.04 are supported at the moment.
# See https://github.com/CodSpeedHQ/action/blob/016456b513677f9d4a1c509c7f8a38d8dd55b2b0/.github/workflows/ci.yml#L19.
runs-on: ubuntu-22.04
needs: [integration-e2e]
strategy:
matrix:
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install && cd ./tests && pnpm playwright install chromium

# only run benchmark in Ubuntu
- name: Benchmarks (Vitest)
uses: CodSpeedHQ/action@v3
with:
run: pnpm run test:benchmark
# token retrieved from the CodSpeed app at the previous step
token: ${{ secrets.CODSPEED_TOKEN }}

# ======== exit ========
pr-check-required:
if: (!cancelled() && !failure())
needs: [ut, integration-e2e, benchmark]
needs: [ut, integration-e2e]
runs-on: ubuntu-latest
name: Test passed or skipped
steps:
Expand Down
Loading