Test benchmark cases in separate job (vercel/turbo#311)
Move benchmark test into separate job and run them for windows and macOS too
This commit is contained in:
parent
e55a098efd
commit
d78084a0b4
1 changed files with 12 additions and 1 deletions
|
@ -100,6 +100,7 @@ impl PreparedApp {
|
|||
async fn dispose(self) {
|
||||
if let Some(mut server) = self.server {
|
||||
server.0.kill().unwrap();
|
||||
server.0.wait().unwrap();
|
||||
}
|
||||
for page in self.pages {
|
||||
page.close().await.unwrap();
|
||||
|
@ -107,6 +108,16 @@ impl PreparedApp {
|
|||
}
|
||||
}
|
||||
|
||||
fn command(bin: &str) -> Command {
|
||||
if cfg!(windows) {
|
||||
let mut command = Command::new("cmd.exe");
|
||||
command.args(["/C", bin]);
|
||||
command
|
||||
} else {
|
||||
Command::new(bin)
|
||||
}
|
||||
}
|
||||
|
||||
fn build_test(module_count: usize) -> PathBuf {
|
||||
let test_dir = TestAppBuilder {
|
||||
module_count,
|
||||
|
@ -117,7 +128,7 @@ fn build_test(module_count: usize) -> PathBuf {
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
let npm = Command::new("npm")
|
||||
let npm = command("npm")
|
||||
.args(["install", "--prefer-offline", "--loglevel=error"])
|
||||
.current_dir(&test_dir)
|
||||
.output()
|
||||
|
|
Loading…
Reference in a new issue