Feat/fetch request #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🐇 CodSpeed benchmarks | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
# `workflow_dispatch` allows CodSpeed to trigger backtest | |
# performance analysis in order to generate initial data. | |
workflow_dispatch: | |
# cancel previous runs on the same PR | |
concurrency: | |
group: ${{ github.ref }}/codspeed | |
cancel-in-progress: true | |
jobs: | |
benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
# We need to fetch all branches and commits so that Nx affected has a base to compare against. | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
- name: Install & cache node dependencies | |
uses: ./.github/actions/install-node-deps | |
- name: Package the repo | |
run: pnpm package | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v1 | |
with: | |
run: pnpm -r bench |