File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,20 @@ namespace :ci do
27
27
}
28
28
end
29
29
entries += NPM_PACKAGES . map do |pkg |
30
- {
30
+ entry = {
31
31
task : "npm:#{ pkg [ :name ] } " ,
32
- test : "npm:#{ pkg [ :name ] } -check" ,
33
32
prerelease : "npm:configure_prerelease" ,
34
33
artifact : "packages/npm-packages/#{ pkg [ :name ] } /#{ pkg [ :name ] } -*.tgz" ,
35
34
artifact_name : "npm-#{ pkg [ :name ] } " ,
36
35
builder : pkg [ :target ] ,
37
36
rubies_cache_key : ruby_cache_keys [ pkg [ :build ] ] ,
38
37
}
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
39
44
end
40
45
entries += WAPM_PACKAGES . map do |pkg |
41
46
{
You can’t perform that action at this time.
0 commit comments