From 535eeb192b3692461da1e675782d4b4eca9fd91f Mon Sep 17 00:00:00 2001 From: Kunal Arora <55632507+aroralanuk@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:12:08 +0530 Subject: [PATCH] fix: remove redundant ``yarn install && yarn build`` from e2e (#4391) ### Description - test.yaml workflow already installs yarn dependencies and runs `yarn build` so it's redundant and wasteful to do the same in the main.rs file for run-locally which is dependent on yarn build as it is. So, I made it conditional if E2E_CI_MODE="false". yarn install ~= 19s yarn build ~= 1m33s It should save us 1m52s in the usual longest running CI item. ### Drive-by changes None ### Related issues ### Backward compatibility ### Testing e2e --- rust/utils/run-locally/src/ethereum/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/utils/run-locally/src/ethereum/mod.rs b/rust/utils/run-locally/src/ethereum/mod.rs index cee390794..8abed1f85 100644 --- a/rust/utils/run-locally/src/ethereum/mod.rs +++ b/rust/utils/run-locally/src/ethereum/mod.rs @@ -19,12 +19,14 @@ mod multicall; pub fn start_anvil(config: Arc) -> AgentHandles { log!("Installing typescript dependencies..."); let yarn_monorepo = Program::new("yarn").working_dir(MONOREPO_ROOT_PATH); - yarn_monorepo.clone().cmd("install").run().join(); if !config.is_ci_env { + // test.yaml workflow installs dependencies + yarn_monorepo.clone().cmd("install").run().join(); // don't need to clean in the CI yarn_monorepo.clone().cmd("clean").run().join(); + // test.yaml workflow builds the monorepo + yarn_monorepo.clone().cmd("build").run().join(); } - yarn_monorepo.clone().cmd("build").run().join(); if !config.is_ci_env { // Kill any existing anvil processes just in case since it seems to have issues getting cleaned up