Skip to content

Commit f483e7b

Browse files
Skip test for emscripten npm package
1 parent d3f283e commit f483e7b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tasks/ci.rake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,20 @@ namespace :ci do
2727
}
2828
end
2929
entries += NPM_PACKAGES.map do |pkg|
30-
{
30+
entry = {
3131
task: "npm:#{pkg[:name]}",
32-
test: "npm:#{pkg[:name]}-check",
3332
prerelease: "npm:configure_prerelease",
3433
artifact: "packages/npm-packages/#{pkg[:name]}/#{pkg[:name]}-*.tgz",
3534
artifact_name: "npm-#{pkg[:name]}",
3635
builder: pkg[:target],
3736
rubies_cache_key: ruby_cache_keys[pkg[:build]],
3837
}
38+
# Run tests only if the package has 'test' script
39+
package_json = JSON.parse(File.read("packages/npm-packages/#{pkg[:name]}/package.json"))
40+
if package_json["scripts"] && package_json["scripts"]["test"]
41+
entry[:test] = "npm:#{pkg[:name]}-check"
42+
end
43+
entry
3944
end
4045
entries += WAPM_PACKAGES.map do |pkg|
4146
{

0 commit comments

Comments
 (0)