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
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 {
You can’t perform that action at this time.
0 commit comments