Skip to content

Commit

Permalink
Speed up WPT checkout (#215)
Browse files Browse the repository at this point in the history
By shallow cloning and only cloning the master branch, the WPT setup can be sped up.

See https://www.bram.us/2020/11/11/speed-up-build-times-with-this-little-git-trick/ details.
  • Loading branch information
bramus authored Jan 29, 2024
1 parent 6164bc8 commit 036233d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/setup/checkout-wpt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (existsSync(checkoutDir)) {
exit(0);
}

execSync(`git clone ${repoUrl}`, {...execEnv, cwd: path.resolve(`${__dirname}/..`)});
execSync(`git clone --depth 1 --branch master --single-branch ${repoUrl}`, {...execEnv, cwd: path.resolve(`${__dirname}/..`)});
console.warn('Ensure that you setup wpt for local test runs per published instructions: https://web-platform-tests.org/running-tests/from-local-system.html');
console.log(`Checked out ${checkoutDir}`);

Expand Down

0 comments on commit 036233d

Please sign in to comment.