corepack enable
pnpm run bootstrap
cd cd runner
first.
For example developing the workflow of ./github/workflows/pull-request.yml
, you could find an open pull request and run with the PR number:
pnpm tsx src/cli.ts bench --pull-number=12725 --repeats=3
This will run the benchmark process as on GitHub Actions, including
- Request GitHub API to get the pull request information
- Clone the Vite repository of source branch and target branch (usually
main
) - Build the
vite
packages of source branch and target branch - Copy the
vite
packages dist to${workspaceFolder}/vite
- Run the benchmark process
- Report in terminal
To make the test without the heavy process of cloning and building, you could adding following flags after have running a full process above. Then it will directly re-use the built vite dist without step 2
, 3
, 4
.
pnpm tsx src/cli.ts bench --pull-number=12725 --repeats=3 --skip-clone --skip-prepare
If you encounter GitHub API rate limit, you could add GITHUB_TOKEN
with you PAT to environment variables to increase the rate limit.