File tree Expand file tree Collapse file tree 8 files changed +1347
-20
lines changed Expand file tree Collapse file tree 8 files changed +1347
-20
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
2
3
3
commands :
4
+ install-rsync :
5
+ - run : sudo apt update && sudo apt install rsync
4
6
install-asdf :
5
7
steps :
6
8
- run :
Original file line number Diff line number Diff line change @@ -66,12 +66,22 @@ jobs:
66
66
command : |
67
67
asdf plugin add tinygo https://github.com/schmir/asdf-tinygo.git || true
68
68
asdf plugin add binaryen https://github.com/birros/asdf-binaryen.git || true
69
+ asdf plugin add nodejs || true
69
70
- run :
70
71
name : " Install asdf managed executables"
71
72
command : |
72
73
asdf install tinygo
73
74
asdf install binaryen
75
+ asdf install nodejs
74
76
- run : make build wasm
77
+ - node/install-packages :
78
+ app-dir : ../js/shutter-crypto
79
+ override-ci-command : npm install
80
+ - run : make wasm-js
81
+ - run :
82
+ name : " Run WASM tests"
83
+ command : |
84
+ make wasm-js-test
75
85
- run :
76
86
name : " Run unit tests with gotestsum"
77
87
command : |
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
+ extends : "eslint:recommended" ,
3
+ ignorePatterns : [ "derived/*.js" ] ,
4
+ parserOptions : {
5
+ sourceType : "module" ,
6
+ } ,
2
7
env : {
8
+ browser : true ,
3
9
jest : true ,
10
+ node : true ,
4
11
} ,
5
12
} ;
Original file line number Diff line number Diff line change @@ -4,9 +4,13 @@ NPM ?= npm
4
4
NPX ?= npx
5
5
TINYGO ?= tinygo
6
6
7
- build : derive
7
+ clean :
8
+ rm -r dist
9
+ mkdir -p dist
10
+
11
+ build : clean derive
8
12
${NPX} webpack build
9
- cp -L derived/shutter-crypto.wasm dist/
13
+ rsync derived/shutter-crypto.wasm dist/shutter-crypto.wasm
10
14
11
15
publish : build
12
16
${NPM} publish --access=public
@@ -22,5 +26,7 @@ derived/wasm_exec.js:
22
26
cp $(shell ${TINYGO} env TINYGOROOT) /targets/wasm_exec.js derived/
23
27
patch --quiet --directory derived --strip 1 --input ../patches/wasm_exec.patch
24
28
29
+ test :
30
+ ${NPM} test
25
31
26
- .PHONY : build derive publish
32
+ .PHONY : build derive publish test
You can’t perform that action at this time.
0 commit comments