File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
packages/npm-packages/ruby-head-wasm-wasi Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ jobs:
107
107
artifact_name : " npm-ruby-head-wasm-emscripten"
108
108
builder : " wasm32-unknown-emscripten"
109
109
- task : " npm:ruby-head-wasm-wasi"
110
+ test : " npm:ruby-head-wasm-wasi-check"
110
111
prerelease : " npm:configure_prerelease"
111
112
artifact : " packages/npm-packages/ruby-head-wasm-wasi/ruby-head-wasm-wasi-*.tgz"
112
113
artifact_name : " npm-ruby-head-wasm-wasi"
@@ -139,6 +140,9 @@ jobs:
139
140
if : ${{ inputs.prerel_name != '' && matrix.entry.prerelease != '' }}
140
141
- name : rake ${{ matrix.entry.task }}
141
142
run : docker run -v "$GITHUB_WORKSPACE:/build" -w /build -e "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" sha256:$BUILDER_IMAGE_ID rake ${{ matrix.entry.task }}
143
+ - name : rake ${{ matrix.entry.test }}
144
+ run : rake ${{ matrix.entry.test }}
145
+ if : ${{ matrix.entry.test != '' }}
142
146
- uses : actions/upload-artifact@v2
143
147
if : ${{ matrix.entry.artifact }}
144
148
with :
Original file line number Diff line number Diff line change @@ -280,14 +280,20 @@ end
280
280
281
281
namespace :npm do
282
282
NPM_PACKAGES . each do |pkg |
283
+ base_dir = Dir . pwd
284
+ pkg_dir = "#{ Dir . pwd } /packages/npm-packages/#{ pkg [ :name ] } "
285
+
283
286
desc "Build npm package #{ pkg [ :name ] } "
284
287
task pkg [ :name ] => [ "build:#{ pkg [ :build ] } " ] do
285
- base_dir = Dir . pwd
286
- pkg_dir = "#{ Dir . pwd } /packages/npm-packages/#{ pkg [ :name ] } "
287
288
sh "npm ci" , chdir : pkg_dir
288
289
sh "#{ pkg_dir } /build-package.sh #{ base_dir } /rubies/#{ pkg [ :build ] } "
289
290
sh "npm pack" , chdir : pkg_dir
290
291
end
292
+
293
+ desc "Check npm package #{ pkg [ :name ] } "
294
+ task "#{ pkg [ :name ] } -check" do
295
+ sh "npm test" , chdir : pkg_dir
296
+ end
291
297
end
292
298
293
299
desc "Configure for pre-release"
Original file line number Diff line number Diff line change 10
10
" dist" ,
11
11
" README.md"
12
12
],
13
+ "scripts" : {
14
+ "test" : " cd ../ruby-wasm-wasi && npm test"
15
+ },
13
16
"repository" : " https://github.com/ruby/ruby.wasm" ,
14
17
"homepage" : " https://github.com/ruby/ruby.wasm/tree/main/packages/npm-packages/ruby-head-wasm-wasi" ,
15
18
"publishConfig" : {
You can’t perform that action at this time.
0 commit comments