Skip to content

Commit

Permalink
prevent benchmark running on push in pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcastil committed Oct 1, 2024
1 parent ec04f5e commit 4540a4f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Benchmark

on:
push:
branches:
- main
pull_request:

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.11.1
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
- run: yarn install --frozen-lockfile
- name: Run benchmark
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: yarn bench
21 changes: 0 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,3 @@ jobs:
path: dist
if-no-files-found: error
- run: yarn test:exports
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.11.1
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
- run: yarn install --frozen-lockfile
- name: Run benchmark
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: yarn bench

0 comments on commit 4540a4f

Please sign in to comment.