From a22987857211a3e32e55852817c367b502c08dc9 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 26 Apr 2024 10:59:45 -0400 Subject: [PATCH] Fix cross_repo for node_js repositories NodeJS repositories were running bin/setup plus npm install which was causing failures. --- lib/manageiq/cross_repo/runner/base.rb | 4 ++-- lib/manageiq/cross_repo/runner/github.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/manageiq/cross_repo/runner/base.rb b/lib/manageiq/cross_repo/runner/base.rb index 209f135..625616a 100644 --- a/lib/manageiq/cross_repo/runner/base.rb +++ b/lib/manageiq/cross_repo/runner/base.rb @@ -83,8 +83,8 @@ def defaults "node_js" => { "language" => "node_js", "node_js" => ["18"], - "install" => "npm install", - "script" => "npm test" + "install" => "yarn", + "script" => "yarn run test" }, "ruby" => { "language" => "ruby", diff --git a/lib/manageiq/cross_repo/runner/github.rb b/lib/manageiq/cross_repo/runner/github.rb index 968623a..aee21cb 100644 --- a/lib/manageiq/cross_repo/runner/github.rb +++ b/lib/manageiq/cross_repo/runner/github.rb @@ -24,7 +24,7 @@ def ci_config result = {"language" => language} result["before_install"] = steps_by_name["Set up system"]["run"] if steps_by_name["Set up system"] - result["before_script"] = steps_by_name["Prepare tests"]["run"] if steps_by_name["Prepare tests"] + result["install"] = steps_by_name["Prepare tests"]["run"] if steps_by_name["Prepare tests"] result["script"] = steps_by_name["Run tests"]["run"] if steps_by_name["Run tests"] result