Skip to content

Commit

Permalink
don't include arguments when not running against a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed Nov 8, 2024
1 parent f317144 commit 5429600
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,36 @@ jobs:
- attach_workspace:
at: .
- run:
name: Benchmarking Packages
name: Starting local registry
working_directory: scripts
command: |
yarn local-registry --open &
until curl -s http://localhost:6001 > /dev/null; do
echo 'Waiting for local registry to be available...'
sleep 2
done
yarn bench-packages --baseBranch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload
# if there is a base branch AND a PR number in parameters, benchmark packages against those
# this happens when run against a PR
- when:
condition:
and:
- << pipeline.parameters.ghBaseBranch >>
- << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Benchmarking packages against base branch
command: yarn bench-packages --baseBranch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload
# if there is a NOT a base branch OR NOT a PR number in parameters, just upload benchmarks for the branch
# this happens when runned directly on branches, like next or main
- when:
condition:
or:
- not: << pipeline.parameters.ghBaseBranch >>
- not: << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Uploading package benchmarks for branch
command: yarn bench-packages --upload
- store_artifacts:
path: bench/packages/results.json
- store_artifacts:
Expand Down

0 comments on commit 5429600

Please sign in to comment.